可可:框架和边界有什么区别?UIView它的子类都具有以下属性frame和bounds..有什么关系呢?
3 回答
守候你守候我
TA贡献1802条经验 获得超10个赞
- (void)viewDidLoad { [super viewDidLoad]; UIWindow *w = [[UIApplication sharedApplication] keyWindow]; UIView *v = [w.subviews objectAtIndex:0]; NSLog(@"%@", NSStringFromCGRect(v.frame)); NSLog(@"%@", NSStringFromCGRect(v.bounds));}
{{0, 0}, {768, 1024}}{{0, 0}, {768, 1024}}
{{0, 0}, {768, 1024}}{{0, 0}, {1024, 768}}
- 3 回答
- 0 关注
- 656 浏览
添加回答
举报
0/150
提交
取消