I want to put UIbutton
at bottom which should be displayed on my all view like tabBar and onclick
of that UIButton
I want open the menu view, How can achieve this feature, I tried lot for this and also lot of google search for it, but not mention the way to achieve this properly, So please suggest me the the proper way to achieve this
I have done this before by adding a button in the Appdelegate class. I don't know whether it's a correct approach or not, but it's working.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
viewController = [[SUSAViewController alloc] initWithNibName:@"SUSAViewController" bundle:nil];
nav=[[UINavigationController alloc]initWithRootViewController:viewController];
self.window.rootViewController = nav;
UIButton *mybtn=[UIButton buttonWithType:UIButtonTypeRoundedRect];
mybtn.frame=CGRectMake(40, 200, 200, 200);
[mybtn setTitle:@"My Button" forState:UIControlStateNormal];
[nav.view addSubview:mybtn];
[self.window makeKeyAndVisible];
return YES;
}
If you are not using NavigationController
then simply add [self.window addSubview:mybtn];
Hope it will work for you.