uilabel Questions
6
Solved
I want to make UILabel's text bold
infoLabel=[[UILabel alloc]initWithFrame:CGRectMake(90,150, 200, 30)];
[infoLabel setText:@"Drag 14 more Flavors"];
[infoLabel setBackgroundColor:[UIColor clearCo...
Concerted asked 5/1, 2011 at 9:38
6
Solved
I have a cell with multiline UILabels, but when the text's label does not fit the frame, no dots are shown. How can I fix this?
Fordone asked 13/10, 2013 at 22:1
17
Solved
I am Copying the same Question asked Before Question.
I have tried the solutions given and was not able to solve it since sizetofit was not effective when I use Autolayout.
The expected display ...
Leduc asked 19/2, 2015 at 11:35
7
Solved
So I have code, which is sucessfully working on iOS 7.0 but not in 7.1. I have a simple tableview, with code:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (N...
Harrietteharrigan asked 12/3, 2014 at 17:7
1
I struggled in the past to have UILabel adjustsFontSizeToFitWidth working on multiline labels. I soon have found also here on stackoverflow that
adjustsFontSizeToFitWidth property "is effective...
2
Solved
My goal is to set the textColor of my custom UILabel subclass in my view controller. I have a UILabel subclass named CircleLabel. Here are the basics of it:
class CircleLabel: UILabel {
required ...
Chalfant asked 25/10, 2015 at 3:36
10
Solved
[self.Review sizeToFit];
Result before sizeToFit:
NSStringFromCGRect(self.Review.frame): {{90, 20}, {198, 63}}
Result After sizeToFit:
NSStringFromCGRect(self.Review.frame): {{90, 20}, {181, ...
Slipon asked 25/10, 2012 at 11:44
4
I have two UILabels next to each other in row with left and right adjustments so that it looks like below.
|-Some text left adjusted----------some other text right adjusted-|
Both labels have a...
Antoinette asked 28/11, 2013 at 9:26
2
I have a UILabel and set:
let label = UILabel()
label.minimumScaleFactor = 10 / 25
After setting the label text I want to know what the current scale factor is. How can I do that?
Floccus asked 14/7, 2015 at 19:59
17
Solved
Is there a way to use two, or even three font colors in a single label in iOS?
If the text "hello, how are you" were used as an example, the "hello," would be blue, and the "how are you" would be...
Holoblastic asked 1/1, 2015 at 5:20
1
This code worked fine on iOS 12 and under and the issue occurs when running iOS 13. The goal is to remove the line height spacing to 0 so my labels have a reduced amount of space in between text. I...
Hallock asked 23/9, 2019 at 19:51
11
Solved
I am getting a HTML Response from a webservice
Below is the HTML I am getting in response
<p><strong>Topic</strong>Gud mrng.</p>
\n<p><strong>Hello Everybody&l...
2
Solved
I have two labels embedded inside a horizontal UIStackView. One of the labels might grow too large in size, therefore, one of them is truncated.
Or, their sizes are being split in some proportion ...
Interested asked 2/5, 2018 at 22:9
10
Solved
When I try setting the color of a UILabel to the color of another UILabel using the code
myLabel.textColor = otherLabel.textColor
It doesn't change the color. When I use this code, however,
my...
5
Solved
I'm trying to center some text but I it doesn't seem to be working.
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any addition...
10
Solved
I want to create a clickable label on my app leading me to a Safari webpage. I also want the user to be able to phone the numbers only by clicking on them ?
Thanks for your advices
Armet asked 21/5, 2012 at 8:39
4
Solved
Does UILabel have any value that can be set in order to make it selectable?
I have a label that I want to be selectable, (long press and a copy btn shows up) kinda like in Safari.
3
I expected from the label to keep the minimal height of one line even if you remove the text out of it.
Here's the picture:
How it should look (but without whitespace):
If I enter the one wh...
Rosanarosane asked 25/8, 2017 at 15:45
9
I set the numberOfLines to 1 in the IB, but when I set the text to a long string, it doesn't truncate. If I set the numberOfLines to 2, the truncate works fine.What should I do to truncate a long s...
Lapland asked 10/12, 2012 at 4:3
2
Solved
Is it possible to set a Notification for when a UILabel's text property is changed? I tried the one used for UITextFields when I couldn't find one for a UILabel, but it didn't work.
[[NSNotificat...
Tortuga asked 14/1, 2013 at 21:0
20
I want to display a string like this in a UILabel:
There are 5 results.
Where the number 5 is red in color and the rest of the string is black.
How can I do this in code?
Scarify asked 28/6, 2011 at 5:7
8
Solved
I'm currently looking at a UILabel with the property addMessageLabel.layer.cornerRadius = 5.0f; On a device with iOS 7.0 installed, it has rounded corners. On a device with iOS 7.1 installed, it do...
Unlock asked 11/3, 2014 at 5:0
2
I have a UILabel that is put as titleView in the navigation bar. I want it to have 2 lines, where the first line can be truncated and the second is center aligned.
In code it looks more less like...
Spillway asked 24/5, 2016 at 9:18
0
The problem I am facing is that UILabel will break line in the middle of the word although I am using word wrapping.
You can create a new project and replace content of view controller to see the ...
Microscopic asked 20/6, 2019 at 10:13
5
Solved
This is part of an iPhone application but should apply to Cocoa written in objC in general.
I have a UILabel holding various amounts of text (from single characters to several sentences). The text...
Certie asked 19/8, 2010 at 10:30
© 2022 - 2024 — McMap. All rights reserved.