0

我想通过我的应用程序的点击事件DDMenuController从内部屏幕调用。UIButton当我这样做时,它将创建双导航栏作为图像。有人可以帮我做到这一点。

随附的在此处输入图像描述

4

1 回答 1

0

Pushing a UIViewController should not produce a double Navigation Bar effect unless one is added after loading the view, and not as part of the application's UINavigationController. Nevertheless, you can Push a UIViewController using,

[[self navigationController] pushViewController:yourViewController animated:YES/NO];

If your UIViewController is designed using Storyboard, then you can call it by using the following code. (Remember to set the Storyboard Identifier of your DDMenuController to something, as it will be using in the following code.)

//Add this to the top of your page with the other imports.
#import "DDMenuController.h"

//Add this to the selector called by your UIButton.
DDMenuController *ddMenu = (DDMenuController *)[[self storyboard] instantiateViewControllerWithIdentifier:@"DDMenuVC"];
[[self navigationController] pushViewController:ddMenu animated:YES/NO];
于 2012-12-13T10:23:17.067 回答