UIWebView Rotation and Background Color - ios

I've run into an interesting situation with a UIWebView. In Interface Builder, I set all four constraints to equal the margins and filled the webview with content. It works exactly as you'd expect.
An issue occurs when I rotate the webview. The webview rotates but in doing so, it reveals an grey background color. This isn't a color that I've set. In fact, I set the parent's view to have a black background color to match the webview content.
Here are my constraints for reference:
I'd appreciate any guidance on how to make my webview will the entire border or at least, manually change the grey color. Much thanks!
Note: This only occurs in the simulator. I haven't tried this on a device yet.

Ack ... it was the background view that was the culprit. The simulator didn't pick up my color changes. I never did a clean on them. I tested today and was able to change the grey color to the one of my choosing.

Related

Change the StatusBar text color based on underlying content

In our application we have a page where the StatusBar overlays user generated images. Sometimes these images have a darker top, and sometimes a lighter. This means sometimes the Statusbar on that page isn't visible, or is extremely hard to see. Considering this is the main page of our application, I'm wondering if there's a way to change the color of the StatusBar text based on the underlying content.
(Best font color for the background).
Yes, I'm aware we could show a static background color for the StatusBar, but that would be extremely tacky.
I have perfect way for this: in top of your view with image create minimal shadow. It will be invisible to the user

Is it possible to change background color of interface rotation

My App has a white background UIWindow.backgroundcolor. When I rotate the device the white background rotates on black background.
Is it possible to change the background behind that window?
I would like to have all white. Any ideas? Thanks in advance.
You cannot change the black color as it is actually not a part of the app. What you can do in this case is add a very large (somewhat larger then the screen size) root view and center it. Then place everything else into this view. This way when your app changes orientation the large view will also rotate, but because of it's size it's edges will never reach the screen and the black color will remain hidden.

Add color to white bounce area of UIWebView

I'm trying to add a beige color to the bounce white space area that appears when dragging this WebView off screen. I've tried setting the WebView and WebView.ScrollView background colors manually and also setting them to transparent with opaque set to false having the ViewController's view background color set to beige - no luck. I also read in some of the objective-C iOS threads that adding a SubView with the background color I want to the WebView would do the trick, but could not get this to work in Mono.
The background of the Web content has been set in the HTML code of the document.
I wish I could post an example image, but don't have 10 rep yet. Feel free to ask for a better description.
Can anyone shed some light on how to accomplish this?
I set the background colour of my webView to clearColor in my nib file and for me it works fine:
Let me know if it still doesn't work for you.

Resize background color when resizing view?

I have a view with a background color. How to re-size the background color when the view change its size? My problem is even if the view is bigger, the background color size still the same size.
I had the same problem. I thought I had.
When device have rotated, background (background colour) didn't have change its size.
At least it looked as background colour's size didn't change.
I had feeling the situation is stupid. Size of background colour, but not of background? What? I said I felt being mad. But everything looked like background colour keeps it's size despite of device rotation.
I am writing this in attempt to help developers who will google for answer in same circumstances.
Background colour is not separate view, it is a part of its view, so it is absolutely impossible for background colour to have size other than size of its view. Scrutinise hierarchy of your view. You must have some subviews which make you think your background doesn't change size.
NSLog(#"%#", [self.view recursiveDescription]); // compiler will warn it doesn't know method recursiveDescription, it doesn't matter.
// TODO: remove line above from production code if you don't want to be rejected!
will log view's hierarchy of your view controller.

Scrollview Delay / Lag in pageControl

We are building an iPad catalog application with images. The image scrolling is very smooth (no delay) using scrollview, however the corresponding the pageControl (small dots at the bottom) take an extra 1.5 sec approximately. Please see attached screenshot.
Is there a way to minimize this lag/delay? Thank you for your help.
What I'm getting from your question is horizontal scrolling (using the Page Control) is lagging/choppy. Run your app on the simulator, and from the 'Debug' menu, click 'Color Blended Layers'. This option will highlight any transparent object in red. Optimally, everything would be green. Try making everything red green by setting its background color to the background color of its superview, if that is possible and setting the view's opaque setting to YES. Good luck. For more information: check out the the documentation.
What is happening, in your code, when you move to a new page? Are you pulling down any data, images, etc... ?
On a side note, I would look into both the ScrollView and PageControl to see how they rendered. It could be ScrollView is using Bitmap images once the views are rendered and PageControl is not.

Resources