我在iOS-App-Project中有一个包含两个UIImages的scrollview。在纵向设备模式中,UIImages垂直排列。这是正确的,但是当我以横向模式旋转设备时,UIImages也垂直排列。但这就是我的问题......我想横向排列它们。我尝试使用pagingEnabled或contentMode但它不起作用。
我喜欢通过实际设备模式更改ScrollView的contentMode:
- (void)didRotate:(NSNotification *)notification {
UIDeviceOrientation orientation = [[notification object] orientation];
if (orientation == UIDeviceOrientationLandscapeLeft) {
NSLog(@"Querformat-Links");
} else if (orientation == UIDeviceOrientationLandscapeRight) {
NSLog(@"Querformat-Rechts");
} else if (orientation == UIDeviceOrientationPortraitUpsideDown) {
NSLog(@"Hochformat-180 Grad");
} else if (orientation == UIDeviceOrientationPortrait) {
NSLog(@"Hochformat");
}
}
-ScollView
- UIImage
- UIImage
感谢您的帮助!
对不起我的英语错误:)我来自德国。