I have a webview, which show a link to a specific website, but the display is fixed, it feels like browsing the web from old style mobile, n not iphone.
Is there a way to make a webview pinchable? Since the webview in my apps is not pinchable, which mean I can't zoom it in or out.
Any help is appreciated.
Thanx in advance.
You need to make sure that scale pages to fit is checked in IB, and that multi-touch & user interaction are enabled.
That worked for me:
UIWebView *webView = [[UIWebView alloc] initWithFrame:self.bounds.frame];
webView.scalesPageToFit=TRUE;
Related
I'm in the process of emulating an instagram like application for iOS using Xcode and objective-c. I looked around but I could not figure out how Instagram implemented the following grid feed:
https://debsphuong.files.wordpress.com/2014/10/5-volleyball-hashtag-page.jpg
Any insights would be greatly appreciated it. Thank you
That is a UICollection view. when you tap on the button to turn that grid into a single column grid, the cells are resized to the width of the view and reloaded again.
I have an OS X application with a WebView that reloads the WebView on the first click if the click is not on a link within the view.
Any suggestions of how to hunt this down? I assumed it would have to do with focus, but I thought maybe someone had encountered something like this before.
Thanks, Charlie
Please check in your code somewhere you are loading it manually something like this:-
[[webView mainFrame]loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:#"http://www.google.com"]]];
In my iPad app, I am playing some PDF and Videos on UIWebView. I need to scroll pdf to read further pages. But at the same time the videos are also scrollable, which I want to disable. I am playing all these files on a single web view. I can write a condition to disable scrolling on a video and enable on a PDF. But I have no idea what to write inside the condition. Can anyone help me disabling scrolling of UIWebView.
Thanks
PC
You can disable scrolling of an entire UIWebView by:
webview.scrollView.scrollEnabled = NO;
As far as I know, it is not possible to disable scrolling for just one section of a UIWebView.
webView.userInteractionEnabled = NO;
Please note that this technic disables touches and interaction on the web view
I've got an UITextView in my app where rss feeds are loaded in. Now I want that when there's a link in the textview and you tab on it, my webview should open that link not safari. How can I do this?
Hey,
It will be difficult for you to know where you have clicked in your UITextView.
Honestly the best way for you to do that it to use the Three20 framework.
I don't think this is possible in a UITextView without significant effort.
Just an idea, but could you not load your RSS feed directly into a UIWebView? - (You can display a HTML formatted string in a UIWebView). Subsequent link presses could then by hijacked using the UIWebView delegate and handled by your application to (for example) open them in another UIWebView. Take a look at the UIWebView interface & delegate to see if it might help.
Hope this helps!
Nick.
My UIWebView has a huge data to display and the default scrollbar that comes with UIWebview takes lot of time to scroll.
Is it possible to implement a scrollbar on which user can tap and drag that were he wants.
Any hint in the right direction would be highly appreciated.
Waiting for your reply.
Thanks in advance
It depends on the type of the contents you are displaying in UIWebview.
Did you try make use of Javascript calls to scroll to certain ids within your html page?
Take a look at the wikipedia application or Wikipanion for iPhone for example... They have navigation screen so the user can jump to the section of their interest without the need to scroll the whole page.
hope that will help.