开发者

UILabel on multiple rows auto centers text though i want it to maintain the text's position

I have a UILabel on multiple rows. The thing is that the number of rows varies and i don't know to maintain the place of the text from the label ( th开发者_运维问答e label auto-centers the text in it's width and height ) . Can anyone help ?


I am also face this problem ,but i solve this set no of lines 0 for that label and line break mode is Word wrap finally give max width and height to that label. i think it will work fine. thank you


You'll need to find the length that can be fitted within the bounds of the label. Check out this link which shows how to find length of a string to be displayed with a particular font.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜