簡體   English   中英

NIPhotoAlbumScrollView:設備旋轉后無法調整圖像

[英]NIPhotoAlbumScrollView: unable to adjust image after device rotation

我正在使用Nimbus框架中的 NIPhotoAlbumScrollView ,並且一旦旋轉設備,顯示的圖像就會失去其中心位置...有人使用了此組件並遇到了相同的情況嗎?

ps:我正在為NIPhotoAlbumScrollView及其NIPagingScrollViewPage使用(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)

在相應的視圖控制器方法中調用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];
}

文檔http://latest.docs.nimbuskit.info/interface_n_i_paging_scroll_view.html#a3cd8024a82d09f24019ea916551904c4

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM