|Feb 20, 2012, 03:31 PM||#1|
Is it possible to resize a UIWebView via code?
The reason I want to do this is because I have a ToolBar with navigation-buttons that appears each time the webview is touched, and disappears when the user clicks a hide-button.
The problem is that the toolbar is displayed on top of the webview, thus sometimes making stuff on the webpage untouchable.
The perfect solution would be the ability to resize the webview when the toolbar appears and disappears, but so far I have not found any solution.
Any ideas would be welcome.
|Feb 20, 2012, 05:14 PM||#2|
You might want the toolbar to disappear by itself after a period of time.
If not then the web view has a frame like every other view. Just adjust the frame to make the web view bigger and smaller when needed.
|Feb 20, 2012, 06:01 PM||#4|
This code works perfectly for my needs.
// Resize: Webview height small (toolbar opened) CGRect newFrame = webView.frame; newFrame.size = CGSizeMake(self.webView.frame.size.width, self.toolBar.frame.origin.y); webView.frame = newFrame; // Resize: Webview height Full (toolbar closed) CGRect newFrame = webView.frame; newFrame.size = CGSizeMake(self.webView.frame.size.width, (self.toolBar.frame.origin.y + self.toolBar.frame.size.height) ); webView.frame = newFrame;
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|UIWebview background color||DennisBlah||iPhone/iPad Programming||0||May 24, 2014 11:26 AM|
|Closing a UIWebView?||Tander||iPhone/iPad Programming||6||Jan 2, 2014 06:32 AM|
|Word 2008: Cannot Resize tables (with resize pointer)||mujimuji||Mac Applications and Mac App Store||1||Jul 31, 2013 12:09 PM|
|Nitro Engine in UIWebView||DSchwartz88||Jailbreaks and iOS Hacks||3||Jun 28, 2012 09:16 PM|
|UIWebView Help||drewgarcia23||iPhone/iPad Programming||1||Jun 5, 2012 09:50 AM|
All times are GMT -5. The time now is 10:19 AM.