本文介绍了如何在UIView上居中放置UILabel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在UIView上居中放置UILabel?我正在使用以下代码
How can I center the UILabel on the UIView? I am using the following code
float width = weatherView.bounds.size.width; float height = weatherView.bounds.size.height; [self.label setFrame:CGRectMake(width-100,height-100, 100, 100)];推荐答案
怎么样:
[self.label setCenter:view.center];更多推荐
如何在UIView上居中放置UILabel
发布评论