2013-09-24 25 views
0

我在我的iOS應用程序中遇到EGOPhotoView庫的問題,我希望有人能幫助我。EGOPhotoViewer和NavigationController

我的應用程序使用NavigationController,但不顯示NavigationBar,因爲導航管理我的一些自定義控件。問題是,當我用EGOPhotoView庫顯示圖像庫時,顯示出現在導航條上:當我彈出EGOPhotoViewController時,NavigationBar仍然顯示,但我不想要。

有人可以幫我解決這個問題嗎?

感謝

回答

0

您可以設置一個類(可能是您的應用程序代理)是導航控制器的委託。然後,當EGOPhotoViewController彈出時,您可以隱藏導航欄。例如。

- (void)navigationController:(UINavigationController *)navigationController 
     willShowViewController:(UIViewController *)viewController 
        animated:(BOOL)animated 
{ 
    if ([navigationController.topViewController isKindOfClass:[EGOPhotoViewController class]]) 
    { 
     [navigationController setNavigationBarHidden:YES animated:YES]; 
    } 
}