Iphone NIPhotoAlbumScrollView:设备旋转后无法调整图像
我正在使用来自的NIPhotoAlbumScrollView 一旦我旋转设备,显示的图像就会失去中心位置。。。是否有人使用了此组件并面临我的相同情况Iphone NIPhotoAlbumScrollView:设备旋转后无法调整图像,iphone,objective-c,ios,nimbus-ios,Iphone,Objective C,Ios,Nimbus Ios,我正在使用来自的NIPhotoAlbumScrollView 一旦我旋转设备,显示的图像就会失去中心位置。。。是否有人使用了此组件并面临我的相同情况 ps:我正在使用(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)遮罩,用于NIPhotoAlbumScrollView及其NIPagingScrollViewPage在相应的视图控制器方法中调用NIPhotoAlbumScrollView的这些方法 - will
ps:我正在使用(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)遮罩,用于NIPhotoAlbumScrollView及其NIPagingScrollViewPage在相应的视图控制器方法中调用NIPhotoAlbumScrollView的这些方法
- willRotateToInterfaceOrientation:duration:
- willAnimateRotationToInterfaceOrientation:duration:
像这样
- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation { return YES; }
//====================================================================================================
- (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation duration: (NSTimeInterval) duration
{
[super willRotateToInterfaceOrientation: toInterfaceOrientation duration: duration];
[self.photoAlbumView willRotateToInterfaceOrientation: toInterfaceOrientation duration: duration];
}
//====================================================================================================
- (void) willAnimateRotationToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation
duration: (NSTimeInterval) duration
{
[super willAnimateRotationToInterfaceOrientation: interfaceOrientation duration: duration];
[self.photoAlbumView willAnimateRotationToInterfaceOrientation: interfaceOrientation duration: duration];
}
文档我不明白这如何解决问题。。。我该怎么做呢?(无论如何,我在旋转后调用“reloadData”暂时解决了这个问题……但我知道这不是最好的解决方案)这些方法为旋转准备相册视图。在UIViewController子类中调用它们为我解决了这个问题。