sizetofit Questions

25

Solved

I am creating an app which will have a question in a UILabel and a multiple choice answers displayed in UITableView, each row showing a multiple choice. Questions and answers will vary, so I need t...
Landman asked 7/4, 2010 at 19:0

6

Solved

In a simple iPhone app I display a letter tile (custom UIView with an image and 2 labels) by the following code in viewDidLoad: DraggedTile *tile = [[[NSBundle mainBundle] loadNibNamed:@"Dragged...
Bac asked 27/3, 2014 at 13:16

2

Solved

I am trying to programmatically manipulate a UILabel so that it has a dynamic width. I found that using sizeToFit() does this exact behavior. Now as this label becomes my navigationItem.titleView....
Renfrow asked 17/5, 2016 at 13:1

5

Solved

Hi everyone I have problem with my tableview, i make Cell with uilabel with SizeToFit and then calculate the UILabel Height for set the cell Height everything work well except when i scrolling my t...
Squeeze asked 5/6, 2013 at 20:46

1

Our users are experiencing recurring crashes in the method below. The crashes happen always in the one of the lines: [lbl sizeToFit] (the lbl variable is re-initialized and reused. to my understand...
Fumigator asked 20/10, 2014 at 8:45

6

Solved

I'm trying to show a long chunk of text inside a UILabel in one line. The UILabel is a subview of UIScrollView so I can scroll and see the entire UILabel. My problem is that the sizeToFit method o...
Calculus asked 18/11, 2013 at 8:1

2

Solved

I'm trying to resize a text view according to content & also it's sibling and parent container. Below code is working fine in iOS 6 if (/* less than ios 7 */) { CGRect frame = _textView.fra...
Selfrising asked 7/11, 2013 at 13:26

4

Solved

I'm using autolayout on iOS7 and I have a problem like this: I'm putting a UILabel onto a UIView and I'm arranging my autolayout constraints so that the label's centerX = parent view's centerX. I...
Hydr asked 1/1, 2014 at 23:5

2

I want to build typography poster using UILabel left and margin: 25 320(device width) - 50(sum of the margins) = 270(label width frame) The font size of each label should change in order to fit...
Sasaki asked 16/1, 2015 at 11:40

4

When I test my app on IOS7 simulator. Sometimes I found it is weird when I using sizeToFit of a UITextView. The frame after sizeToFit seems right but the text can only show partly just like the pho...
Notochord asked 21/9, 2013 at 4:18

2

On iOS 5. I have a UILabel element that is originally placed in a nib. I want the x placement to stay fixed. I want it to take either 1 line, or 2 lines. If more than two lines, it should us...
Equilibrate asked 8/9, 2012 at 4:42

2

Solved

I'm calling sizeToFit on a UILabel which has right aligned text in it. It shrinks the height and width of the UILabeland fits the text to the top left of the UILabel. Now...the position of the UIL...
Marla asked 5/4, 2011 at 8:32

1

If I set textLayer.wrapped = YES, how do I resize textLayer to contain the wrapped text? I.e., how do I get the new height of the textLayer? Basically, I want something like -[UILabel sizeToFit]. ...
Vetiver asked 21/11, 2011 at 22:44
1

© 2022 - 2024 — McMap. All rights reserved.