0

Nimbus フレームワークのNIPhotoAlbumScrollViewを使用して いますが、デバイスを回転させると、表示される画像の中心位置が失われます... 誰かがこのコンポーネントを使用して、同じ状況に直面しましたか?

ps: NIPhotoAlbumScrollViewとそのNIPagingScrollViewPageの両方に(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)マスクを使用しています

4

1 に答える 1

1

対応するViewControllerメソッドで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

于 2012-02-16T12:07:53.553 に答える