Loading on webview by keeping content fix at bottom - ios

I am trying to show some content on webview. No problem in showing the content. But, I have a text field at the end of the content. I want to fix it on my webview even I am in starting of the webview scroll.
It was done automatically if I enable page to fit for my webview. But, scale page to fit does not satisfy my requirement.
Any suggestions appreciated.
Thanks!

Related

How to display a couple pages of text in swift ios

I've got an information page which has about 3 pages worth of text to display.
What would be the best method to display all this text in an iOS application coded in swift?
I have been trying to do it with scroll view but I can't fit all the text into one label on one screen. And all the tutorials I'm following say to set the scroll view to the size of the label. But the thing is my text is so long that it would fill the screen several times.
How could this be accomplished so that no matter which device size screen it's being viewed on it will fit all my text and be scrollable vertically?
I can't seem to get it working with a scrollview :/
Put the content in an HTML file, and render it using WKWebView: https://developer.apple.com/library/ios/documentation/WebKit/Reference/WKWebView_Ref/index.html#//apple_ref/occ/cl/WKWebView
You can make a text view non editable.
I have this problem also.. Maybe you could use table view and add contents programmatically.. hope it could add to your imagination.

UIWebView content size resetting while come back from background

I am using a UIWebView in my UIViewController.
After web-view finished loading i am programmatically added a UIButton in the bottom of UIWebView with extended ContentSize.
When the app enters background and comes back again, it seems as if the contentSize that i dynamically added was changed to the content size of UIWebView content.
Does anyone have an idea what I am missing here and/or why this happens? Thanks for your time!
Best Regards,
Gison

UIWebView scalesPageToFit property, what is it actually doing?

UIWebView has a property called scalesPageToFit, which can be set to YES or NO.
I was wondering if anyone had an explanation as to what it actually does with regards to how it works. What criteria is it looking at when it scales the page? Is it looking for the widest table or div and then zooming out to fit that?
Thanks
So far to my knowledge when you set scalesPageToFit to YES it will show the content within the Webview space.
Then you can zoom out to see the content according to the users capability of reading.
I have done this a few times for pdf file, so it will show the pdf content within the content width. Actually it will scale it proportionally.

Zooming and UIWebView

I am having a problem with UIWebView. My application displays pdfs from local memory and displays them in a webView in fullscreen mode. By default, when the page loads, the content is apparently set to fit horizontally, which cuts off some of the bottom of the pdf. I would like it to initially show up vertically fit and horizontally centered. I have looked for an answer to this question for quit some time and can't seem to find anything.
Any ideas?
(Please do not suggest scalesPageToFit. Although it fixes many beginning problems, this is not one of them.)
uiWebView.scrollView property has the ability to set zoom and also manage display of content
UIScollView class ref

Resizing the content of UIWebView?

A noob here so it might take a while to understand what's the wrong, just follow along ..
the key purpose of my app is to download an xml file from rss feed then parse it and pass it as html file to a webview with this method: [webView loadHTMLString:aString baseURL:nil]
after the content took place in the webview it doesn't fit nice and neat instead there's some photos in the content that has a width larget than what it can be displayed at once without scrolling horizontally,as well as the attachments at the end of the webview you have to scroll a bit right or left to read the full name of it, it'd be nice if the content stretched so it can be seen without scrolling horizontally.
Notice that I adjusted webview property scalesPageToFit to be YES, but that scaled the content to very small size to the point that you can't read what it contains!
any solution around this?
You need to use a meta/viewport tag and se the content width. See documentation, here:
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html

Resources