Top "Uilabel" questions

The UILabel class implements a read-only text view in iOS.

Adding NSMutableParagraphStyle lineSpacing cause text to not fit UILabel

I have created a normal UILabel and want to be able to add line spacing to the text which does …

swift uilabel nsparagraphstyle
Can I center a UIToolbar item?

I am putting a label on a UIToolbar (per this tip: Adding a UILabel to a UIToolbar). But the toolbar …

iphone uilabel uibarbuttonitem uitoolbar
Read More/Less with Swift 3

I want to add "Read more" at the end of the paragraph. When I click on the "Read more" text, …

ios swift3 uilabel uitextview expand
UILabel appearance font and attributed string font

In my app I have a global custom font applied to all labels like so: UIFont *font = [UIFont fontWithName:kMyFontName …

ios objective-c uilabel nsattributedstring uiappearance
how to set CATextLayer text vertical position?

I create UILabel and CATextLayer in my app using following code - (void)viewDidLoad { [super viewDidLoad]; self.textLabel = [[UILabel alloc] …

ios uilabel calayer catextlayer
Add a tap gesture to a part of a UILabel

I have a NSAttributedString like so: NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"testing it out @clickhere"]; NSInteger length = str.length; [str …

ios iphone uilabel nsattributedstring uitapgesturerecognizer
UILabel with two different color text

How can i have a UILabel with two different colors for the font? I will have text in two different …

ios xcode uilabel nsattributedstring textcolor
UILabel with text of different color in Storyboard

I try to set UILabel with text of different colors programmatically using, NSMutableAttributedString * string = [[NSMutableAttributedString alloc] initWithString:@"firstsecondthird"]; [string addAttribute:…

ios objective-c xcode uilabel textcolor
How to change truncate characters in UILabel?

When the text of a UILabel gets truncated there are 3 dots inserted by default. Is it possible to change these …

iphone uilabel truncation
UILabel text to fill in the frame width

I want to build typography poster using UILabel left and margin: 25 320(device width) - 50(sum of the margins) = 270(label width …

swift uilabel sizetofit