Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change color behind app on rotation

When an iOS app rotates it will reveal a black background when the app is between portrait and landscape. Is it possible to change this color from the default black to white? Changing the UIWindow's background color will not help. Here is an example of the black background in Safari during rotation: Safari rotation

like image 703
Jorn Avatar asked Dec 20 '22 17:12

Jorn


1 Answers

I have done something similar but I couldn't find the source now, but here is the idea:

Create and add a significantly larger view as backing view and center it.

Add the UIWebView as subview of this large view whose background is white.

Re-position the center of the UIWebView, too.

like image 166
Unheilig Avatar answered Jan 09 '23 11:01

Unheilig