uilabel Questions

3

I am working with a label which shows the old price of a product with strikethrough attribute. I am trying to set the strikethrough property for the attributed string but could not get the actual r...
Rainfall asked 30/8, 2017 at 12:14

3

Solved

I want to add an image in start of UILabel. Label is multiline. If I use contentInset, it indent the whole label but I want to indent first line only. I have tried this so far, this doesn't work ...
Felipa asked 29/1, 2014 at 12:8

2

Solved

I am trying to add two labels in the place where the title is shown in navigation bar, but I am struggling to do so. It would be very nice if I could achieve this with storyboard but as I can see I...
Presume asked 10/7, 2015 at 22:30

0

I'm generating a PDF something like: UIGraphicsBeginPDFContextToFile layer.render(in: context) UIGraphicsEndPDFContext Yesterday, I found a fix to make all text vector-based (basically this ans...
Lockup asked 19/12, 2018 at 11:11

5

Solved

User from storyboard or programatically can set font weight as regular, semi bold etc. I want to read weight for any font label. I tried po label.font.description and font-weight is there and but...
Seato asked 8/2, 2018 at 13:13

1

Solved

I thought I would save others hours of debugging and say that setting adjustsFontForContentSizeCategory to true has no affect on labels you set the attributedText value of (at least in tableview ce...
Johnnyjumpup asked 9/1, 2018 at 20:23

7

Solved

How do I add a rupee symbol in a UILabel on the iPhone?
Domingodominguez asked 27/3, 2011 at 8:52

2

Solved

I want to make a UIButton with type UIButtonTypeCustom (for the shape). I want to assign the title using button.titleLabel because I need to specify the font. The following code looks like it shoul...
Enchantment asked 5/2, 2011 at 23:37

4

Solved

I'm trying to find my UILabels in my superview of my UIViewControllers. This is my code: func watch(startTime:String, endTime:String) { if superview == nil {println("NightWatcher: No viewcontroll...
Salience asked 20/8, 2014 at 19:8

1

Solved

I have some table view cells that need to display some simple html from our server. Am converting the html into an NSAttributedString so that it can be displayed in UILabel objects on the cells. Bu...
Mealtime asked 13/11, 2018 at 2:4

3

Solved

I came across a weird scenario, that I just can't figure out on my own. I started a little test scenario, with an almost empty iOS Single View Application and a storyboard. The story boards contai...
Plural asked 29/5, 2015 at 7:8

9

Solved

have googled around but found no solution: Basically, i have a Localizable.strings set up, which i'm using in my code. However, it would be really sweet if i somehow could just refer those values ...

5

Solved

I am using the following code to strike through the text NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc] initWithString:(text ? text : @"")]; [attributeString addAt...
V1 asked 25/3, 2014 at 19:36

10

Solved

How do I align text in UILabel?
Katzman asked 19/4, 2011 at 21:7

4

Solved

I have added an UILabel to a custom cell's contentView. I met with a strange side effect. On the right border there is a gray edge. I don't know why. I just added an ordinary UILabel, I have done n...
Edomite asked 2/12, 2012 at 14:26

6

Solved

I'm currently developing a simple photoshop like application on iphone. When I want to flatten my layers, the labels are at the good position but with a bad font size. Here's my code to flatten : ...
Geotaxis asked 8/8, 2012 at 14:48

7

Solved

I'm moving from swift 3 to swift 4. I have UILabels that I am giving very specific text properties to the label. I'm getting an 'unexpectedly found nil while unwrapping optional value' error when s...
Cognate asked 9/10, 2017 at 13:16

2

Solved

I have a label that uses a NSMutableAttributedString to write out the text as: What I want to do is lower the asterisk's top padding so that its midY is even with the word Cuisine like below: How...
Winburn asked 14/9, 2018 at 16:38

3

Solved

In a UITableView that needs to display a long list of chatlike conversations, often containing emojis, a size calculation error occurs. My problem is, that if a string is just the right length, an...
Shari asked 23/10, 2013 at 9:1

21

Solved

Is it possible to reduce the gap between text, when put in multiple lines in a UILabel? We can set the frame, font size and number of lines. I want to reduce the gap between the two lines in that l...
Antipode asked 31/3, 2011 at 1:50

2

Is it possible to truncate the UILabel text before 5 character of string in autolayout based on the screen size and different device orientation ex. Test test test test test test...*1234 I kn...
Pavis asked 16/8, 2018 at 9:47

5

Solved

I am try to change font for a label but it's doesn't work font name:new New san francisco. Import that font into project and add in info.plist and this is my code labelname.font = [UIFont fontWit...
Niobium asked 24/9, 2015 at 13:18

8

Solved

I'm trying to solve this problem as in the application I'm working on I have a lot of fonts, so size of label is being calculated dynamically when user changes font. The problem that I have is tha...
Customary asked 29/11, 2015 at 17:25

1

I'm building a list view with self-sizing in my app using UICollectionView. Getting UICollectionViewFlowLayout to do a vertical list layout is a pain, so I'm writing my own UICollectionViewLayout s...

1

Solved

I am new to Swift. I am getting this error: Cannot assign to property: 'width' is a get-only property While using this statement: cell.reciverMsg.frame.width = cell.reciverMsg.text?.ch...
Radloff asked 12/7, 2018 at 6:27

© 2022 - 2024 — McMap. All rights reserved.