Explorar el Código

Set a better initial zoom scale when using a web view to display text.

Ryan Olson hace 11 años
padre
commit
3b5ed964b2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Classes/Global State Explorers/FLEXWebViewController.m

+ 1 - 1
Classes/Global State Explorers/FLEXWebViewController.m

@@ -35,7 +35,7 @@
     self = [self initWithNibName:nil bundle:nil];
     if (self) {
         self.originalText = text;
-        NSString *htmlString = [NSString stringWithFormat:@"<pre>%@</pre>", [FLEXUtility stringByEscapingHTMLEntitiesInString:text]];
+        NSString *htmlString = [NSString stringWithFormat:@"<head><meta name='viewport' content='initial-scale=1.0'></head><body><pre>%@</pre></body>", [FLEXUtility stringByEscapingHTMLEntitiesInString:text]];
         [self.webView loadHTMLString:htmlString baseURL:nil];
     }
     return self;