Reputation: 2102
I created a project with a UIPageViewController
embedded in UINavigationController
in the storyboard.
This pageController has 2 UIViewController
with inside an instance of UIWebViewController
. The problem is that the web view appear under the top bar.
Do you have any idea for solve this?
Note:
I don't want to use self.edgesForExtendedLayout = UIRectEdgeNone;
for solve this problem because I want that my web view will be visible under the NavigationBar
This is the PageViewController:
DataViewController *startingViewController = [self.modelController viewControllerAtIndex:0 storyboard:self.storyboard];
NSArray *viewControllers = @[startingViewController];
[self setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
self.dataSource = self.modelController;
This is the DataViewController:
[self.webView loadHTMLString:@"...My Html..." baseURL:nil];
[self.webView setDelegate:self];
The ModelController is the same of Apple Example Project
And this is the storyboard:
Upvotes: 1
Views: 906
Reputation: 742
If you wants to start the UIWebView under the Navigation Bar then there is one easier way to do .
Follow the below steps:
After that your view will starts from the completion of the navigation Bar.
I think it will solve your problem..
Upvotes: 2