我有3个按钮内的视图。我的问题是,我怎么能设置resizing mask
或autolayout
编程,我得到这个解决方案:客观c调整大小的掩码
小视图和大图..
Objective-C代码:
_button1 = [UIButton buttonWithType:UIButtonTypeCustom];
[_button1 setFrame:CGRectMake(0, 0, self.view.frame.size.width, 70)]; // set a height?!
[_button1 setBackgroundColor:[UIColor colorWithRed:235/255.0f green:235/255.0f blue:235/255.0f alpha:1.0f]];
_button1.autoresizingMask = UIViewAutoresizingFlexibleHeight;
_button2 and_button3 are the same..
如何根据视图高度设置按钮高度灵活?
感谢您的帮助..
你可能使用自动版式该会过得更好。 – ipmcc
是的..我如何解决使用自动布局编程的问题? – q0re