Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone NIPhotoAlbumScrollView:设备旋转后无法调整图像_Iphone_Objective C_Ios_Nimbus Ios - Fatal编程技术网

Iphone NIPhotoAlbumScrollView:设备旋转后无法调整图像

Iphone NIPhotoAlbumScrollView:设备旋转后无法调整图像,iphone,objective-c,ios,nimbus-ios,Iphone,Objective C,Ios,Nimbus Ios,我正在使用来自的NIPhotoAlbumScrollView 一旦我旋转设备,显示的图像就会失去中心位置。。。是否有人使用了此组件并面临我的相同情况 ps:我正在使用(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)遮罩,用于NIPhotoAlbumScrollView及其NIPagingScrollViewPage在相应的视图控制器方法中调用NIPhotoAlbumScrollView的这些方法 - will

我正在使用来自的NIPhotoAlbumScrollView 一旦我旋转设备,显示的图像就会失去中心位置。。。是否有人使用了此组件并面临我的相同情况


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子类中调用它们为我解决了这个问题。