So here's the problem, I am using WebKit, i set up a button which when clicked loads a website using NSURL. The problem is I need this website to load within the app(have that part covered) but when it does load the web page does not take the status bar in consideration. I posted a picture here with loading in just google.com (http://postimg.org/image/dncilg139/). The battery is touching the sign in portion of the website. I need a way for the web page to shift below the notification center. I need this in the new language SWIFT.
The easiest way to make this look correct is to add a UINavigationController to this scene in your storyboard. Select your UIViewController or UIWebViewController from the storyboard and from the menu select Editor->Embed In->Navigation Controller.
Related
I am trying to implement Navigation Drawer like menu on my iPhone project.
I have looked at the forums and find out there are many samples given in this link:
Stackoverflow Navigation drawer query
But, they have not helped me much. Because, all the apps are developed Navigation drawer in the Home screen(1st view) of the app itself and using window.rootViewController
My requirement is, I need Navigation Drawer like menu NOT in the home screen(1st view) of the app, rather need on the 2nd view of the app, hence I don't know how to add this feature.
Could someone please suggest me how to add navigation drawer like menu feature in later views(for ex: 2nd view) of the app?
I don't quite get how you want the menu. You can add Navigation Controller anywhere you want, all it's going to do is give you a Navigation Bar on which you can give a title and a Back button, usually with the name of the title of the previous page.
You can simply add the navigation where you want and control drag from the view or object you want to perform the segue. If it's a button you can use an IBAction with a performSegueWithIdentifier method.
Hope I could help
It will become clear as you read that I have very little experience programming please excuse me for an elementary question. I have on the storyboard the template for a tab based app. which has two view controllers both of which have a web view on them and both seem to be working fine. As I needed a third tab I dragged a view controller onto the storyboard and linked it to the tab bar controller, I also created a "thirdViewContoller.swift" file which was copied from one of the other two which was in the template. Ran the app and everything works fine. I now drag a UiWebView onto the third view controller and unlike the other two when I try to control drag the webView to the code it will not link up. What am I missing. Many thanks for any help.
Did you check that your thirdViewController class is set in the storyboard? Click the yellow circle on your third view controller that you added in the storyboard. Go to the Identity inspector tab. Make sure the "Custom class:" field is set to thirdViewController. Now you should be able to make an IBOutlet for your web view by control dragging.
I have a slide out menu in my app and each of the things in the menu goes to the respective pages.
Basically, when I tap "graph section" on the dashboard, I want it to go to the graph page without the Dashboard back button.
I've tried doing this with a modal segue but this provides a back button which means I can't access the menu on this page.
Anyone know how to do this?
I am not quite sure whether this answers it but have a look at:
Open View Controller programmatically and not using a Seque
I think you Use navigation controller.Once you hide the navigation controller for that particular page with [self.navigationController setNavigationBarHidden:YES]; and add UIButton and write it's action
I am writing an Xcode Application that has the following structure:
UINavigationController
UITableView
Option 1 Something else
Option 2 Something else
Option 3 UIWebView
Within my web view I have an internal web page with a drill down structure:
UIWebView
Option 1
Option a
Detail from a
Option b
Detail from b
Option c
Option d
Option 2
Option 3
etc.
The navigation up to the UIWeb view is handled by iOS; the navigation once I get the UIWeb view is handled by the web page.
The problem is that I am showing the navigation bar from iOS in the first UIWebView Web page, which want to do, but not in subsequent pages.
How can I handle the handoff of navigation?
OK, I think I figured this out.
It really isn't anything to do with Xpages, but with using UIWebViews within iOS.
The problem was that on the first webView, I wanted to show the iOS Navigation, but in any subsequent ones I didn't want to - would just prefer to use the web navigation.
There is a delegation method in iOS Web views that allows you to show or hide the navigation bar. I added this delegate and just check to see which page I am on. If on the first one, I show the iOS Navigation, else I suppress.
This works great!
How can I display a Dashcode created Browser template in a UIWebView, that the user can dismiss, without having two navigation bars? In the photo below, you'll see that the top bar is part of an Xcode navigation controller with a back button for the purpose of letting the user leave the web view. The lower bar is for the Dashcode created stack and pop of the content hierarchy that the user navigates.
As far as I know, you can't put a button in a web page, Dashcode or otherwise, that will dismiss a cocoa app view controller. If I hide the Xcode navbar, the user can't get rid of the web view when they're done. I can't hide the Dashcode navbar or the user can't navigate the content.
As some background, what I'm trying to accomplish is in-app documentation that I host on the web. Similar to how the Apple iPhone Cards app does with its Help view. This would allow me to update the documentation via my web page, without needing to update the app itself.
The answer appears to be floating a Done button in a transparent view that floats over the top of the web view. Thereby giving the effect that the Done button (from Xcode IB) is part of the NavBar from Dashcode Browser template.