(iPhone/iPad开发)详解UIView的center属性
2013-12-03 14:51
519 查看
查看官方文档,对center的解释是
The center is specified within the coordinate system of its superview and is measured in points. Setting this property changes the values of the
frame properties accordingly.
特别特别注意了,center指的是当前View在父视图的中心点,也就是说,只要当前View与super View的frame不一致,想取相对当前View的中心点最好用bounds去算,用center得话注意考虑当前View在super View的平移情况。今天解决的一个bug就是与这个点有关。
The center is specified within the coordinate system of its superview and is measured in points. Setting this property changes the values of the
frame properties accordingly.
特别特别注意了,center指的是当前View在父视图的中心点,也就是说,只要当前View与super View的frame不一致,想取相对当前View的中心点最好用bounds去算,用center得话注意考虑当前View在super View的平移情况。今天解决的一个bug就是与这个点有关。
相关文章推荐
- ios-坐标系统(详解UIView的frame、bounds跟center属性[图])
- iPhone开发应用之UIView中动画属性分析
- iOS 7 iPhone iPad应用开发技术详解
- Iphone开发之UIView中的动画属性
- iPhone开发之UIView中的动画属性
- iphone UIView的opaque属性详解
- 详解UIView的frame、bounds和center属性
- Ios-坐标系统(详解UIView的frame、bounds跟center属性[图])
- ios:UIView动画总结[转]IPhone中UIView中动画及其属性说明[转]详解UIScrollView[转]以及cocos2d框架简介[转]Automator重命名文件介绍[转]
- Iphone开发之UIView中的动画属性
- (iPhone/iPad开发)在UIView上绘制文本
- ios-坐标系统(详解UIView的frame、bounds跟center属性[图])
- 详解UIView的frame、bounds、center属性
- ios开发之UIView的frame、bounds跟center属性的区别(附图)
- ios-坐标系统(详解UIView的frame、bounds跟center属性[图])
- iPhone开发:Objective-C属性修饰关键字使用详解
- ios-坐标系统(详解UIView的frame、bounds跟center属性[图])
- Iphone开发之UIView中的动画属性
- iOS开发之详解剪贴板 - CocoaChina 苹果开发中文站 - 最热的iPhone开发社区 最热的苹果开发社区 最热的iPad开发社区 (2)
- ios-坐标系统(详解UIView的frame、bounds跟center属性[图])