I wanna hide a navbar that my webview has. The webview is within a view and it's inside a view controller.
The problem is that I don't want to show the navigation bar of the webview. I have to choices:
1) hide the navbar of the webview behind the navbar of the viewcontroller
2) Hide the navbar using javascript.
Any idea of how can I do that?
You can use
self.navigationController?.navigationBarHidden = false // or true
Related
I have a tabbar controller in which there are two view controllers. One has navbar shown (VC1), one has navbar hidden (VC2). I push to VC2 using tabbar icon, then I navigate to VC3 from there via UIButton and now tabbar is hidden using
hidesbottombarwhenpushed = true
I then navigate BACK to VC1 using the following
dvc.tabBarController?.selectedIndex = 0
the problem is, no matter what I set to false for hidden, I cannt get the navbar or tabbar to reshow.
Can someone tell me the correct way to hide/show navbar/tabbar and programatically navigate froma view back to a home page tab with hiding/showing navbar/tabbar?
Is there any way to add a fixed button to a page view controller?
In the above picture i would like to have the Close button fixed i.e. do not move away when different view is displayed.
Embed in a NavigationController or add a navigationBar and put a BarButtonItem in it.
I'm working on a iPhone app with storyboard.
I need to put a TabbarController in a containerView like this:
The red rectangle in the controller on the left is a view I need to show always in the app.
I put 6 item in the tabbar so the tabbar show the "more" item.
When I tap on the "more" item I can normally customize the tabbar, but when I tap on "done" button nothing happens: the customization sheet don't disappear and I can't tap on the other items in the tabbar.
If I use the tabbar not in the containerView alla works fine.
Any help?
Thanks in advance!
Simone
Using UIToolbarDelegate in the view controller and also tried using UIBarPositioningDelegate in the view controller and also using this method in the same view controller
- (UIBarPosition)positionForBar:(id<UIBarPositioning>)bar
{
return UIBarPositionBottom;
}
but after using all this still toolbar items showing very close to status bar icons.
Not using Interface builder but toolbar items frame position added programmatically.
Any ideas please how to show toolbar items at the bottom of the toolbar.
Thanks
I am implementing a facebook integration in my ipad app.I am presenting a veiwController to load facebook URL modally using modalPresentationStyle = UIModalTransitionStyleCrossDissolve. Now I want to implement a navigation bar on the top which will show a title Facebook and a button to close this view.
I tried adding a navigation bar but it didn't show up because my viewController is not tied to any navigationController and tried toolbar as a subview to the viewController's view but it shows up only after the webView is finished loading.
I want to know how should I implement a permanent navigation bar so that I can any time close the modal view.
While the navigation bar doesn't show up automatically, you can always add the navigation bar via IB. I was able to get it working in a sample project. You can take a look and see if it helps you.
Another thing is that you are doing modalPresentationStyle = UIModalTransitionStyleCrossDissolve;. This is incorrect in that you are assigning a transition style to the presentation style property but works because the values are basically enums and UIModalTransitionStyleCrossDissolve ends up with the same value as UIModalPresentationFormSheet.