English 中文(简体)
• 如何规范 • 改变方向;
原标题:How can TTStyledTextLabel change width/height on orientation changes?

我认为我 st。 你们怎样才能使TTStyledTextLabel扩大到现有的食宿?

我看到,你可以按照这些思路做一些事情,从而做到这一点:

CGSize captionSize = [_label.text sizeWithFont:_label.font 
                             constrainedToSize:CGSizeMake(maxWidth, CGFLOAT_MAX)
                                 lineBreakMode:UILineBreakModeWordWrap];

_label.frame =  CGRectMake(boundsX + 90 , 40, captionSize.width, captionSize.height);

你如何与TTStyledTextLabel做同样的事?

问题回答

Try setting the autoresizing mask. To pin the left and right bounds relative to the superview and have it stretch the width to fit the space in between, you would use:

[label setAutoresizingMask:UIViewAutoresizingMaskFlexibleWidth];

每一条<条码>查询均支持自动取证。 监督员及其观点控制员还可以更积极地利用<条码>-[《国际意见书》排版]和<条码>-[《国际意见书目观察》>检索其次意见。





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签