I am new in iOS development and want to show the WebView on fullscreen, it is showing on fullscreen in iPhone5 but not in iPhone6. it comes on half of the screen plz take a look at https://www.dropbox.com/s/0o7b8l3o52d8623/Screen%20Shot%202014-12-31%20at%202.33.00%20pm.png?dl=0
Asked
Active
Viewed 1,486 times
1
-
1THis problem may occur for a lot of reasons. Share what you did so that we can understand whats wrong. – Rashad Dec 31 '14 at 09:53
-
My initial thoughts would be to do with sizing. If you have explicitly set the webviews size, this will cause issues – Naughty_Ottsel Dec 31 '14 at 10:02
-
i am using autolayout plz take a look at this https://www.dropbox.com/s/0o7b8l3o52d8623/Screen%20Shot%202014-12-31%20at%202.33.00%20pm.png?dl=0 – Muhammad Naveed Akram Dec 31 '14 at 10:09
-
Unable to open links... – Krunal Dec 31 '14 at 10:19
-
How are you creating your constraints? It looks to me like it's the right size for an iPhone 5 screen, so I'm guessing you have your XIBs sized to that in Interface Builder and that you *don't* have constraints that would "pull" the right and bottom edges to fill the screen. Please provide more detail. – mbm29414 Dec 31 '14 at 10:20
-
i hv not enough reputation on stackoverflow to attach the image, what should i do to send the snaps – Muhammad Naveed Akram Dec 31 '14 at 10:22
-
i am using storyboard – Muhammad Naveed Akram Dec 31 '14 at 10:35
1 Answers
2
Muhammad Naveed Akram Set Your View to Autolayout.
And another method to Set Constrain like as and Dislike Use AutoLayoutButton.
self.webView.autoresizingMask=UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleTopMargin;
And if You Using Custom Tool Bar then Set Autosizing For WebView like as
For WebView
For ToolBar
Hope it Helps You.

iOS Developer
- 133
- 3
- 14
-
by doing this , webview comes on full screen but the tool bar vanished – Muhammad Naveed Akram Dec 31 '14 at 11:28
-
-
yes i am using custum tool bar and adding button on that just shown in above link – Muhammad Naveed Akram Dec 31 '14 at 12:18
-