I am using sidebar like FB.I need to use that sidebar for every view controller.But i need to write a code in single page alone and call that single view controller to every view controller without using any plugins or storyboard.Please find the images below.I have three view controller like view1,view2 and sidebar.I need to load the sidebar controller in both view1 and view2 with that corresponding button action.But my app get crash if i click the button inside the sidebar.If i wrote action that button in view1 and view2 means it is working.So i need to work with sidebar controller button action.
0
votes
Please find the images below, but Where are images???.
– Toseef Khilji
Can you please add some more information to your question, like the images you refer to, the code you use where the app crashes...
– user1781290
the code to load the sidebar view NavigationViewController *cont=[[NavigationViewController alloc]init]; [cont LoadData:backgroundView:self.view]; -(void) LoadData :(UIView *) view1 :(UIView *) view2 { UIButton *settings1=[UIButton buttonWithType:UIButtonTypeCustom]; [settings1 addTarget:nil action:@selector(ButtonAction2:) forControlEvents:UIControlEventTouchDown];[backView addSubview:settings1]; In this i cant get buttonaction2
– MaheThiru
sorry viruss i cant load my images..Please refer this link for imageshttps://stackguides.com/questions/21403357/using-multiple-view-controller-in-single-view-controller-iphone-sdk
– MaheThiru
1 Answers
0
votes
You can use MFSideMenu.
It utilizes view controller containment and gives you a simple API for implementing side-menu functionality. It integrates with storyboard-based apps as well as traditional setups.
If you want to write your own code then go through this Answer. It contains all the steps with description. You can follow them easily.