uilabel Questions

6

Solved

I am implemententing a "read more" functionality much like the one in Apple's AppStore. However, I am using a multiline UILabel. Looking at Apple's AppStore, how do they decrease the last visible l...
Quatrain asked 27/2, 2013 at 13:36

6

Solved

I want to change the UILabel text color but I can't change the color, This is how my code looks like. UILabel *categoryTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 46, 16)]; categoryTit...
Theron asked 28/3, 2010 at 9:20

8

I want to set the alignment of a text label, how can I do that?
Dennison asked 16/4, 2011 at 12:54

3

Solved

I need to add some tapGestures to some part of a text, thats in a UILabel. It seems to be able to make a hyperlink - so I guess its possible to make a functioncall as well, but I'm just not sure ho...

9

Solved

Is there a way for UILabel to draw a border around itself? This is useful for me to debug the text placement and to see the placement and how big the label actually is.
Grinnell asked 22/2, 2010 at 14:49

2

Solved

I have got some strange problem while using NSMutableAttributedString for setting text part on UILabel. It shows some bizarre symbol for specific emojis. Here's the code i use and the screenshot of...

3

Solved

In my app I have a global custom font applied to all labels like so: UIFont *font = [UIFont fontWithName:kMyFontName size:15.0]; [[UILabel appearance] setFont:font]; This works fine. However, i...
Gesticulation asked 30/7, 2014 at 4:9

8

Solved

I want to display an image next to a UILabel, however UILabel has variable text length, so I don't know where to place the image. How can I accomplish this?
Axum asked 20/8, 2010 at 1:6

8

I have searched the solution to this in the past QAs, but could not find the right one. Does anyone know how to adjust aUILabel size dynamically to fit the text length? I have uploaded the screen s...
Thuggee asked 1/6, 2013 at 1:50

2

Solved

I've been working on a new app with no storyboard. All went fine until I tested my application with Instruments: it leaked every time I assigned a string to a label. When I worked with a storyboard...
Buttonhook asked 12/5, 2018 at 13:20

9

Solved

I want to display the mail ID in my view such that clicking the mail ID should open the mail composer view. I want to display the button text as underlined to show it is a hyperlink and for the bu...

5

Solved

I am having a problem that in iOS I am using UILabel to display 2,3 line text, I want to align text as justified but I am not finding any option to do so. Any suggestions how to make justify text i...
Histogram asked 22/8, 2011 at 10:17

5

Solved

I have created custom navigation controller, I want to be added, a date at the left, a back button on the right and the title next to back button. I tried to add one label, but it does not work. ...
Ommiad asked 12/7, 2013 at 8:59

2

Solved

I was having trouble changing font size in my project, so I made a playground. No matter where I put the font.withSize property, the simulator does not reflect the font size change. import UIKit i...
Deformed asked 18/4, 2018 at 15:45

7

Solved

I've created a method that takes a NSAttributedString and I'm looking to dynamically create a subview and label to put the string into. Because attributes like font and size need to be determined t...
Penthouse asked 7/11, 2013 at 18:59

34

Solved

Consider I have the following text in a UILabel (a long line of dynamic text): Since the alien army vastly outnumbers the team, players must use the post-apocalyptic world to their advantage, su...
Natachanatal asked 15/1, 2009 at 11:19

3

Solved

Is it possible to show multiple lines of text in a UILabel in Swift? I currently use a UITextView which has an internal scroll and I would like to avoid a scroll and display statically. I’ve...
Inhesion asked 12/4, 2018 at 8:13

3

Solved

I want to create a UILabel programmatically with height, width and then I want to add constraints to it also programmatically for positioning the UILabel. Update: I want to create UI like this: ...
Spitter asked 15/7, 2015 at 11:10

6

Solved

I'm trying to make a UIButton that has two lines of text in its titleLabel. This is the code I'm using: UIButton *titleButton = [[UIButton alloc] initWithFrame:CGRectMake(15, 10, frame.size.width-1...
Griceldagrid asked 20/10, 2011 at 6:27

3

Solved

I want to write on the same line of my tableview cell detailTextLabel. For example Left string right string. I'm doing this : NSMutableAttributedString *descriptionAttribute = [[NSMutableAttribu...
Abide asked 24/3, 2014 at 18:12

1

I'm trying to solve a hairy problem with UILabel, and I've gotten most of it figured out, except for one thing: I'm having a challenge understanding what it means for a CTLine to have "string acces...
Celik asked 18/10, 2013 at 4:5

2

Solved

May i know how do i add bottom border to UILable only with shadow? No top, left, right border. this is not working. Here is the code I've tried but it's not working. CALayer* layer = [titleLabel ...
Colleencollege asked 8/9, 2012 at 7:59

0

In my project I'm getting a lot of crashes for CALayerInvalidGeometry; CALayer bounds contains NaN: but I am not able to reproduce the crash and only pick it up in Fabric so it's not possible...
Theoretical asked 14/3, 2018 at 11:7

10

My requirement is that I need to display text in label in such a way that if the length of text is too big to accommodate in one line, i need to truncate it at the end in such a way that only the l...
Disbursement asked 6/12, 2013 at 6:47

3

Solved

In iOS 7, when navigating back using the new swipe-from-edge-of-screen gesture, the title of the Back button ("Artists") fades from being pink (in the example below) and having regular font weight ...
Doyledoyley asked 15/1, 2014 at 14:54

© 2022 - 2024 — McMap. All rights reserved.