frame与bounds的区别

原来你M,frame.size和bounds.size不总是一样的


在UIViewController的- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration里调整self.view的各子控件的位置及大小,一直用的是bounds,今天发现self.view.frame.size跟self.view.bounds.size不一样,用bounds是对的,在CocoaChina上找到lv的帖子了

http://www.cocoachina.com/bbs/read.php?tid=1323


苹果官方解释如下





frame是给父视图用的,bounds是给子视图用的,貌似是这个意思

posted @ 2013-07-24 12:21  脱离语言  阅读(148)  评论(0编辑  收藏  举报