I am showing my website in UIWebView but as it is too large, it is showing that much large in my iPhone screen too.
Is there any way to scale it down to show it property fit in iPhone screen?
Yes you can fit the page..
Like for example
fblikeWebView.scalesPageToFit = YES;
This will fit your page in the webview.
Cheers
Related
Any body knows how to customize AddThis ShareMenu compact view to add additional option like linkedIn.And I also have another problem regarding size of Tumblr and Delicious in iphone .
It is working perfect in ipad and in iphone,the size of Tumblr and Delicious view expands the size of iphone.
AddThis Reference
1st problem I have solved by using simple api method that is given below
[AddThisSDK setFavoriteMenuServices:#"facebook",#"twitter",#"linkedin",#"delicious",#"tumblr",nil];
and another problem is remaining that is to adjust size of tumblr,delicious and linkedIn view according to iphone.It's size is according to ipad not iphone.
I will create the pdf from UIWebView.
I created the pdf by cropping the UIWebView screen.
Then, I have gotten pdf of only part that is currently displayed on the screen of phone.
I want to get pdf of all webview contents.
Does anyone know to solve this problem?
Please help me.
You could set scalesPageToFit to YES. Or scroll the webview after rendering each page.
I have a strange issue in phonegap framework. I want to display PDF file in my application, when I am trying to add PDF file with iFrame tag it doesn't show a PDF with horizontal scroll and with a big zoom size. so getting out of screen.
I tried by another way using embed tag, its also having same problem with addition to that its showing PDF for only first time in the application.
If anybody know how to display a PDF in phonegap with specified zoom level or with scroll bar. Above code is working fine in iPhone mobile safari, but not in phonegap. Any Idea?
Thanks.
To display pdf in phonegap,
have lots of trouble,
but best solution so far,is to used ChildBrowser Plugin for phonegap here is the link-
https://github.com/purplecabbage/phonegap-plugins/tree/master/iPhone/ChildBrowser
this will help you to call child native uiwebview in your application(only for iphone),
so you can easily enjoy pinch zoom feature
Using Phonegap you'll have only one UIWebView so probably the best idea is to open the pdf as a new object link using rel=external
Other suggestion is look at the view-port size, maybe you'll have to increase it's size to allow the pinch and zoom.
I have an application requirement of displaying custom ads in it so I decided to use UIWebView and load specific url with 468x60 ads generated in it. It works like charm, except one thing: loaded ad is too big (naturally) for 320px iPhone screen and I am unable to force it to shrink a litle bit.
What could I possibly do about it? Maybe there are some Javascript/CSS/HTML stuff I could do in ad page?
Checkout the "viewport" meta-tag. It'll let you tell the phone what the width of the page is and you can also set the initial zoom level.
https://developer.apple.com/library/content/documentation/appleapplications/reference/safariwebcontent/UsingtheViewport/UsingtheViewport.html
UIWebView has a property called scalesPageToFit, or you could clip the image to the required dimensions, or resize the property to the correct size before downloading and displaying.
I need to use a website with quite a bit of content in my App via UIWebView.
When I scroll the page in Mobile Safari everything scrolls smoothly. Even if I scroll fast - the grey squared background appears but is rendered properly after a few moments (less then 0.5 seconds).
The same page in UIWebView scrolls jerkily if scrolled fast and doesn't show the grey squared background.
I guess Mobile Safari shows the grey squared background first and renders after that while UIWebview stops the scrolling until the part which will be shown is rendered.
How to I tell UIWebView to behave like Mobile Safari?
It is already being drawn on it's own custom tiledLayer. The problem is that it is by default attempting to draw itself on the main thread so it locks up when I can't be drawn. There is a private message you can call
-(void)_setDrawInWebThread:(BOOL)arg1
That will work BUT you will see empty space when you scroll too fast and it can't keep up with the drawing until it has time to catch up. They use:
-(void)_setDrawsCheckededPattern:(BOOL)arg1
in mobile safari to help with this.
Found a better solution. CGTiledLayer.
http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/CATiledLayer_class/Introduction/Introduction.html