Przeglądaj źródła

About View: hide webview until it's fully loaded to avoid ugly white artifacts on older devices

Felix Paul Kühne 12 lat temu
rodzic
commit
c765c77320
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      AspenProject/VLCAboutViewController.m

+ 6 - 0
AspenProject/VLCAboutViewController.m

@@ -21,6 +21,7 @@
 {
     [super viewDidLoad];
 
+    self.webView.hidden = YES;
     [self.webView loadHTMLString:[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"About Contents" ofType:@"html"] encoding:NSUTF8StringEncoding error:nil] baseURL:nil];
     self.webView.delegate = self;
     self.aspenVersion.text = [[NSString stringWithFormat:NSLocalizedString(@"VERSION_FORMAT",@""), [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] stringByAppendingFormat:@" %@", kVLCVersionCodename];
@@ -45,6 +46,11 @@
         return YES;
 }
 
+- (void)webViewDidFinishLoad:(UIWebView *)webView
+{
+    self.webView.hidden = NO;
+}
+
 - (void)dismiss
 {
     [self dismissModalViewControllerAnimated:YES];