Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

webview flickering



Is there a way to reduce or eliminate flickering in the process of handling a WebView request?

I am using the following rudimentary code to take over a screen and display the contents of a WebView:

windowLevel = CGShieldingWindowLevel();
win = [[NSWindow alloc] initWithContentRect:inputRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreRetained defer:YES];
[win setLevel:windowLevel];
[win setBackgroundColor:[NSColor grayColor]];
webview = [[WebView alloc] initWithFrame:inputRect frameName:URLstring groupName:@"webview"];
[[[webview mainFrame] frameView] setAllowsScrolling:NO];
[self loadURLrequest];
[win setContentView:webview];
[win makeKeyAndOrderFront:nil];


My loadURLrequest: method is as follows:

- (void) loadURLrequest
{
if([[NSURL URLWithString:displayURLstring] isFileURL])
{
[[webview mainFrame] loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:displayURLstring relativeToURL:[[NSURL fileURLWithPath:displayURLstring] baseURL]]]];
}
else
{
[[webview mainFrame] loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:displayURLstring]]];
}
}


Are there tips or tricks to mitigate flickering? Can I pause displaying the rendered output until after the request is finished?

Thanks,
Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.