I am doing app related to tab bar and navigation bar.
I had 4 tab bar button and when i clicked in 3rd button in tab-bar view appears fine and when I clicked back button on third view of tab bar its shows home view. i.e first tab bar item up to here is fine and when i click home button and came back to again to third tab bar item.
It shows the home view again instead of third view. Is there any code for this.
Please help me
-(void)viewWillAppear:(BOOL)animated
{
[self showViewController:self sender:nil];
}
I tried this but getting error "Pushing View Controller more than once is not supported ?"
Related
I am facing a strange issue with Tab bar controller. I have a tab bar controller in main.storyboard working fine. I have 5 different storyboard references for each item and I could see all 5 tabs and tab bar is working fine in the simulator.
On selecting the 3rd tab, there is a button in 1st view controller that pushes to second view controller, here I am hiding the tab bar in viewWillAppear. Then when I push to 3rd view controller, I am showing the tab bar again in viewWillAppear.
Now when I select some other tab item from 3rd view controller and come back to 3rd tab, tab bar is not visible even though i have written below code:
override func viewWillAppear(_ animated: Bool) {
tabBarController?.tabBar.isHidden = false
}
Finally figured out the issue. One of my view controller in storyboard had hide tab bar on push view controller enabled causing the tab bar to hide in my expected view controller. On unchecking it and handling all hide/show tab bar in source code itself, i am able to fix the issue.
I have 4 tabs and in the home tab, I have a button to goto profile view controller.
When I use segue, The view changes completely and it's presented over tab bar. So it gets hidden.
I want to present it under the tab bar so that I can quickly navigate to other tabs without a back button.
I am not sure if this is the right way or not. but you can add presenting viewcontroller's view as subview with the same animation.
if I press the third tab bar (tab bar index : 2), and it opens RequestVC, it will show a black screen like the picture below, so I can't see my label. and I don't know why the green icon in the bottom dissapears
I don't understand why this happens. I just uncheck "transculent" in the navigation bar, and in the NewRequestVC I also check "Hide Bottom bar on Push"
I recreate your storyboard, it's working fine for me.
Try these steps:
delete your navigation controller
embed your request VC in navigation controller
connect your main tab bar to navigation controller relationship segue as view controllers.
Try you restart Xcode?
If there is nothing wrong in storyboard then probably in your code.
[click search options while click search bar on menu][3]
I need below questions to proceed:
is this possible to create custom navigation bar with search bar and buttons or use container view for navigation bar?
check 1st and 2nd image. when click button on navigation bar view added on above button menu. how to show this menu? use view or viewcontroller add subview in each viewcontroller? I have confusions on proceed show menu view. because we have push viewcontoller from menu selection from current viewcontroller.
I have a tab bar with 5 tabs and associated views added in storyboard. The first page seen in app is the view associated with first tab. In each of the five tab views , I have a menu button which gives a side menu which I implemented using MFSideMenu Controller. On clicking menu button , a table view appears from the left side. Table view contains a button named "MyProfile". On clicking it another view, say "Home View " appears. The problem is tab bar disappears in Home View. Is it possible to just show the tab bar without any selection in Home View. Thank You
Code:
for the action of menu button to bring the table view from left
- (IBAction)menuButton:(id)sender {
[self.menuContainerViewController toggleLeftSideMenuCompletion:nil];
}
on clicking the "MyProfile"
- (IBAction)myProfileTapped:(id)sender {
[SlideMenuUtility setCenterViewController:#"HomeNavigationVC"];
[self.menuContainerViewController setMenuState:MFSideMenuStateClosed];
}