UIWebView has an Opaque property that you need to set to false in order for the background to show.
On Sat, Oct 22, 2011 at 4:17 AM, Guido Van Hoecke <[email protected]> wrote: > I have two xibs where I add a UIWebView in code. The html is also built > in code and sets a specific background color, say maroon. > > This works as expected on the simulator, but on the iPhone there's > always a short but disturbing period during which a plain white view is > shown which is then replaced by my html with the maroon background. > > I've tried creating the view in either 'ViewWillAppear' or in > 'ViewDidLoad' but the problem occurs in both cases. > > I've tried to avoid the white background by creating the UIWevView with > e.g. a hard-coded black background as in > > var webView = new UIWebView() { Frame = frame, BackgroundColor = > UIColor.Black }; > > but the black never shows, and it still gives the white flash background > on the iPhone, and not on the simulator. > > I realize that this has all the characteristics of a possible timing > (processing power) problem where the simulator on the mac is obviously > more powerful than the iPhone. Tho only activity that may be a bit time > consuming is the generation of the html string so I tried it with a hard > coded string which has only a maroon colored empty body. Same problem > though. > > This is so frustrating as it really looks very sloppy on the device. > > Please advise, and TIA, > > > Guido > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch >
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
