Display a PDF across the entire screen in xcode - uiwebview

I have an xcode application that runs on the iPad.
It is a controller that holds a UIWebView object.
The PDF is downloaded from the internet with no problems, I just need the PDF to be displayed all the way across the screen in landscape orientation.
Currently, the PDF only uses the left most half of the screen when it is displayed. I need it to span the entire window.
Thanks for your help
Take care
Tony

In the viewDidLoad event,
I added the line....
webView.scalesPageToFit = YES;
and tht forced it to full screen.... perfect.

Related

Tool bars are getting rearranged

I am using VC++ MFC and have the following toolbars in my software.
While working with different screens and software is minimized, if we disconnect the other screen, the toolbars get messed up after restoring the application.
Also that issue occurs, sometimes, when using single screen and change screen resolution or laptop lid is closed and re-open it, most of the cases when application is minimized at time we change anything.
We are not executing any code as such to draw the toolbars every time. While software is starting up, we read the toolbar positions from registry and create toolbars, and while closing application, we read the toolbar current position and save it back to registry.
Please suggest what should I do to fix this..
Thanks...
From the details what i can say is, while you were working on screen of one size the application considering the toolbar co-ordinates in relation to that screen. But when screen changes the old co-ordinates are no more valid as new screen may have different size and that's what causing the issue.

uiwebview preventing access to buttons on uitoolbar

Am I thick or what? I have a view controller, and within that there is a UIWebView. When I run the app, the WebView covers the UIToolbar at the bottom and the UIButtons there, and so you cannot navigate away from the WebView. I cannot figure out how to change the WebView size or behaviour.
Unfortunately I do not have sufficient rep to post screenshots. The WebView displays an html file with text. The WebView partially covers the status bar at the top and completely covers the taskbar at the bottom. I can touch and drag the view up to see the taskbar and buttons at the bottom, but cannot use them.
I am using storyboard to build the app, and have done similar apps before without issue (in iOS6) but iOS7 appears to have thrown me a curveball.
I cannot see how to change the size in Xcode - or should I be looking at the html code in the file that the WebView is calling?
Oddly enough this is no longer an issue, I have not made any changes to code or config, and the only thing different is I upgraded my version of X-Code

Strange LWUIT Dialog behaviour while using Dialog.showPacked() with BorderLayout.CENTRE positioning

I am using LWUIT for series 40 for making my J2ME app and I have noticed a strange behavior of the LWUIT-Dialog while using the showPacked() method, the dialog being positioned with BorderLayout.CENTER.
This happens especially in touch phones.
I have attached an image in order to describe my situation.
Initially the dialog appears as shown in the first part of the image.However,it expands in the next few seconds to become like the one shown in the second part of the image.
Future calls to display the dialog using showPacked appears like the third one.I am clueless as to why this is happening.I want my dialog to appear like the one shown in the first half of the image all the time.Where have I gone wrong?
Note : The content of the Dialog is a an animated label.
I have no idea what the guys did there but I'm guessing they reflow the UI too aggressively. Try setting Dialog.setAutoAdjustDialogSize(false) and see if it solves your problem.
You can remove the title and background et al. with the code below, it makes only your animated GIF show with the dimmed dialog background :
setTitle(" ");
setUIID("Null");
setDialogUIID("Null");
getStyle().setBgTransparency(0);
getSelectedStyle().setBgTransparency(0);
getUnselectedStyle().setBgTransparency(0);
getPressedStyle().setBgTransparency(0);
getDialogStyle().setBgTransparency(0);

how to reduce Flash CS5 swf file size after adding button

i don't work on Flash much but i've made a small banner ad for a client...
its a simple banner with 3 images in it and a button with some actionscript linking to an external campaign monitor.
the target file size is about 70kb.
image compression is turned on in the publish settings.
without the button the file size is fine.
when i add a basic button in with a an event listener and about 5 lines of code the published swf size jumps up to over 200kb...
i've tried deleting the button and it drops back to 70kb...
anyone know what i can do to include a button but also keep the file size reasonably small?
cheers
dog
Are you using text in your button and have you embedded the font? That can really bloat an swf.
What you can try is either break the text apart so you don't need to embed the font (but it makes editing a lot of work)
Or you embed only the characters you have actually typed in the button.
If that is not the problem, please post any more details you can think of, including the code.
Check if you have any images in Flash Library that has Linkage id assigned to it. Remove the linkage id and publish swf.
well, it looks like it was a bug in CS5... i tried opening the banner in flash CS6 and did the same procedure of creating the button and giving it an action... published it and it was now approx 40kb...
very odd.

Capturing Gestures over a UIWebView

I am trying to set up a simple iPad application that has a table view and when you select a row for that table it displays a (drilled down to) UIWebView displaying the selected web page (related to the row selected).
Once in the drilled-down-to view I want to capture EVERY touch and gesture (tap, swipe, pinch, etc) and do my own thing with them. Yes, I know this will make navigating and interacting with the web page displayed impossible, that's the idea.
I have found and played around with the Stack Overflow question that was answered by this wepage: http://mithin.in/2009/08/26/detecting-taps-and-events-on-uiwebview-the-right-way/ and I can't get gestures to work with idea.
Any suggestions would be greatly appreciated. Thanks!
UIWebView already has a lot of gestureRecognizer attached to them. It might be a good idea to remove all those gesture recognizer before adding yours, as a testing unit.
If your gesture recognizer works, that means you could basically store the default recognizer in a private array and as soon as you want to give normal behavior to your webview again, you "reset" the UIWebView recognizer

Resources