J'ai un fichier html local dans mon projet xcode. mais je ne peux pas charger ce fichier html local avec UIWebView.Chargement du fichier html local dans UIWebview
2
A
Répondre
9
Le code pour réaliser votre demande est:
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0,
self.view.frame.size.height,self.view.frame.size.width)];
NSString *indexPath = [NSBundle pathForResource:@"index" ofType:@"html" inDirectory:nil];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:indexPath]]];
[self.view addSubview:webView];
1
Questions connexes
- 1. Chargement du fichier html local dans div
- 2. Xcode UIWebView HTML local
- 3. iso - Chargement d'un fichier php local UIWebView et ajout d'informations
- 4. Comment afficher un fichier html local dans un UIWebView?
- 5. Retard UIWebView lors du chargement de contenu local
- 6. Charger l'image dans le fichier HTML local - UIWebView
- 7. Chargement de pages html locales dans UIWebView
- 8. Chargement d'un fichier HTML local dans l'application de navigation
- 9. Chargement du fichier XML local dans Chrome
- 10. fichier html dans UIWebView
- 11. uiwebView fichier local html problèmes d'animation quand je change viewcontroller
- 12. Comment charger un fichier .html LOCAL avec une UIWebview?
- 13. Imprimer le fichier html local à partir de uiwebview (iOs)
- 14. Injection d'un fichier css local dans UIWebView
- 15. chargement du fichier local en utilisant javascript
- 16. Grand contenu local sur UIWebView
- 17. Afficher un fichier HTML local à partir du répertoire de documents dans un UIWebView sur iPhone
- 18. QtRuby: chargement du fichier HTML dans QTextEdit
- 19. Parcourir le fichier HTML du client local dans WebView
- 20. iPhone - Comment précharger un fichier local dans un UIWebView?
- 21. HTML accès fichier local
- 22. UIWebView charge le fichier HTML à partir du système de fichiers local
- 23. UIWebView - html distant chargement des images locales
- 24. Chargement du code HTML local dans UIWebView sur iOS ne montrant pas les images ou le style locaux
- 25. Charger UIWebView avec un fichier local CSS
- 26. Chargement du fichier xml local dans l'application Windows 8
- 27. Chargement du fichier xml local dans Windows Phone 7 (WP7)
- 28. Chargement du fichier html à partir du répertoire local sur WebView
- 29. Actualiser le contenu du fichier html dans un uiwebview (iphone)
- 30. Erreur lors du chargement html local sur StageWebViewBridge
s'il vous plaît un peu de code –