Monday, June 3, 2013

UIWebView suppressesIncrementalRendering example in Objective C (iOS).

UIWebView suppressesIncrementalRendering

A Boolean value indicating whether the web view suppresses content rendering until it is fully loaded into memory.

@property(nonatomic) BOOL suppressesIncrementalRendering

Discussion of [UIWebView suppressesIncrementalRendering]
When set to YES, the web view does not attempt to render incoming content as it arrives. Instead, the view’s current contents remain in place until all of the new content has been received, at which point the new content is rendered. This property does not affect the rendering of content retrieved after a frame finishes loading.

The value of this property is NO by default.

UIWebView suppressesIncrementalRendering example.
UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.frame];
NSString *urlAddress = @"";

NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
[webView setSuppressesIncrementalRendering:YES];
[self.view addSubview:webView];
[super viewDidLoad];

End of UIWebView suppressesIncrementalRendering example article.