84669 Lernen von Personen
152542 Lernen von Personen
20005 Lernen von Personen
5487 Lernen von Personen
7821 Lernen von Personen
359900 Lernen von Personen
3350 Lernen von Personen
180660 Lernen von Personen
48569 Lernen von Personen
18603 Lernen von Personen
40936 Lernen von Personen
1549 Lernen von Personen
1183 Lernen von Personen
32909 Lernen von Personen
xib中针对横竖屏做了两个view,横竖屏切换着使用。添加约束的时候,应该怎么添加?已经试过相对四周均为0了,但是横竖屏一切换,显示就出现一些问题。
小伙看你根骨奇佳,潜力无限,来学PHP伐。
不好意思,又查了一遍代码,是我自己代码中视图关联出错了,autoLayout没有问题。附上我的作法:
旋转屏幕的时候走的方法:- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) {
// 屏幕从竖屏变为横屏时执行
self.view = _hView; }else{
// 屏幕从横屏变为竖屏时执行
self.view = _vView; }
}
看下size class吧。可以针对不同的尺寸分类设置不同的约束
不好意思,又查了一遍代码,是我自己代码中视图关联出错了,autoLayout没有问题。附上我的作法:
旋转屏幕的时候走的方法:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
// 屏幕从竖屏变为横屏时执行
// 屏幕从横屏变为竖屏时执行
}
看下size class吧。
可以针对不同的尺寸分类设置不同的约束