小编Cha*_*lie的帖子

如何在iphone中设置html + css添加

如何在iphone中设置html + css添加

   webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0,320,458)];
    webView.delegate=self;
    [self.view addSubview:webView];


    // HTML files are stored in the main bundle
    NSBundle *bundle = [NSBundle mainBundle];
    NSString *path = [bundle bundlePath];

    NSString *filename = @"index";
    NSString *fullPath = [NSBundle pathForResource:filename ofType:@"html" inDirectory:path];
    [fullPath stringByReplacingOccurrencesOfString:@"/" withString:@"_"];

    // load a HTML from a file
  //  NSString *chapter_filename = [NSString stringWithFormat:@"Section%@", filename];
   // NSString *sectionHTMLPath = [[NSBundle mainBundle] pathForResource:fullPath ofType:@"html"];

    NSString* htmlContent = [NSString stringWithContentsOfFile:fullPath encoding:NSUTF8StringEncoding error:nil];

    // add a generic template and …
Run Code Online (Sandbox Code Playgroud)

iphone ipad ios

3
推荐指数
1
解决办法
1130
查看次数

如何在iphone中以html显示图像

iOS模拟器屏幕截图21-Jun-2013 2.57.02 PM.png在此输入图像描述

iphone ipad ios

-1
推荐指数
1
解决办法
244
查看次数

标签 统计

ios ×2

ipad ×2

iphone ×2