uilabel Questions
14
Solved
I am trying to calculate the height of a UILabel based on different String lengths.
func calculateContentHeight() -> CGFloat{
var maxLabelSize: CGSize = CGSizeMake(frame.size.width - 48, CGFlo...
2
I am making an app where I have 3 labels. I am using label auto-shrinking to help adapt the label's font size to the device.
These labels are right next to each other, and that therefore means tha...
Cissiee asked 27/3, 2018 at 17:54
3
Solved
I'm using ContextLabel to parse @ , # and URL's. This is the best solution i found, cause it sizes correctly and dont affect performance. It firstly parses string at input and than converts it to N...
Robinett asked 13/5, 2016 at 10:34
4
Solved
The goal is to get a UILabel integrated via UIViewRepresentable to size the same way Text does - use the available width and wrap to multiple lines to fit all the text thus increasing the height of...
Itagaki asked 8/7, 2020 at 4:13
19
Solved
I have a UILabel and in some cases the text is longer then the UILabel itself, so I see the text as "bla bla bla..." I want to add a ...Read More button text at the end of the UILabel..
I've read ...
Battleax asked 31/8, 2015 at 10:33
5
Solved
When people have asked how to set a bold font, most people suggest:
let boldFont = UIFont.boldSystemFont(ofSize: ___)
But take a look at all the font weights that the standard system font offer...
2
I am building a tvos app and i want the UITextView to behave similarly like in tvos Movies app. I am specially interested in the focused appearence. Please have a look ate these two pictures.
Cu...
Specialty asked 8/12, 2015 at 14:50
9
I am in process of adding large title in navigation bar in one of the application. The issue is title is little long so I will require to add two lines in large title. How can I add large title wit...
Radiolarian asked 20/12, 2017 at 8:1
3
Solved
I have a slider with 5 part, which I wanted to step over for these part! and I did this :
@IBAction func changeCostSlider(_ sender: UISlider) {
sender.value = roundf(costSlider.value)
}
I also ...
1
I have a UILabel but it has extra padding on the top and bottom for some reason. I'd like the height of the label to be exactly the height of the text inside it.
I've been searching around on othe...
4
Solved
I'm basically trying to create a UITextField which, when the user has typed something, shows the placeholder text in a UILabel pretty much on the top border.
I've managed to get the UILabel into p...
Richmound asked 7/8, 2019 at 7:22
4
Solved
I have a custom table cell MyCell, that has only 1 multiline label with constraints to the sides. The xib size is 320 x 280.
I am using systemLayoutSizeFittingSize to calculate cell height based ...
Censor asked 6/7, 2015 at 12:50
35
Solved
Many applications have text and in this text are web hyperlinks in rounded rect. When I click them UIWebView opens. What puzzles me is that they often have custom links, for example if words starts...
Rutherford asked 10/8, 2009 at 19:56
22
Solved
When putting multiline label (with linebreak set to Word Wrap) into a stack view, the label immediately loses the linebreak and displays the label text in one line instead.
Why is this happening a...
Miter asked 20/12, 2015 at 22:25
9
I have a problem that boundingRectForGlyphRange always returns CGRect.zero "0.0, 0.0, 0.0, 0.0".
For example, I am coding for touching on a part of text of UILabel feature. My text has fi...
Illaffected asked 16/3, 2016 at 17:38
31
I am trying to make a simple Coffee Calculator. I need to display the amount of coffee in grams. The "g" symbol for grams needs to be attached to my UILabel that I am using to display the amount. T...
Metope asked 10/7, 2014 at 2:21
5
If it were a TextView I could do
self.textView.textContainer.lineFragmentPadding = 0;
But what I have is a multiline label. How do I remove the padding?
5
I have implemented Language Localization in my iOS App. So, now user can set the Arabic Language in my iPad Application.
I am getting the localized string response from the server and now I want ...
Precept asked 25/2, 2014 at 7:33
11
Solved
I've got various views in my iPhone application that require padding e.g a custom UIButton with text aligned left, and a UILabel with a background color.
This may be a really stupid question, but ...
26
Solved
I have added one label in my nib file, then its required to have top-left alignment for that lable. As I am providing text at runtime so its not sure that how much lines there are.
So if text conta...
Schauer asked 25/8, 2011 at 14:25
3
Solved
Some of the custom fonts I've loaded onto my app are getting cut off when displayed in a UILabel. I have multiple custom fonts that I need to properly display. How can I fix this?
Foursquare asked 15/4, 2015 at 1:44
3
Solved
I know that for elements of classes UIButton and UIBarButtonItem they automatically assume window.tintColor as the main colour, which results of an immediate change in case I set a new tintColor to...
Glassco asked 1/10, 2013 at 16:25
4
Solved
I have a problem when using UILabel.
I have two labels here(above images), they have equal font and equal width, textAlignment are both left, they both have 10 characters, but each character hav...
1
Solved
In iOS 15 soft hyphens (\u{00AD}) are not considered when setting text on UILabel. for example: The following code does render the text with the soft hyphen correctly in iOS 13 & 14, but not in...
Skillern asked 24/9, 2021 at 9:50
12
Solved
I am drawing UILabels programmatically. They get their sizes from a database. So I cannot just use sizeToFit. I have already implemented a function that redraws UILabels with a passed ratio. So all...
Overweary asked 2/10, 2013 at 1:49
© 2022 - 2024 — McMap. All rights reserved.