我有 3 个按钮内的视图。我的问题是,我如何设置resizing mask
或以autolayout
编程方式获得此解决方案:
小视野和大视野..
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..
如何根据视图高度灵活设置按钮高度?
谢谢帮忙。。