タグ

ブックマーク / unetori.hatenadiary.org (1)

  • UIWebViewの背景を透明にしてみよう!

    UIWebView* transWebView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; NSString* innerHTML = @"<span style=\"color: #F00;\">hogehoge</span>"; NSString* outerHTML = @"<body style=\"background-color: transparent\">%@</body>"; NSString* htmlString = [NSString stringWithFormat:outerHTML, innerHTML]; [transWebView setBackgroundColor:[UIColor clearColor]]; [transWebView setOpaque:NO]; [

    UIWebViewの背景を透明にしてみよう!
    nashibao
    nashibao 2012/01/19
    ここのshouldStartLoadWithRequestには、 コードからの読み込みも含まれてしまうらしい。 なので、 - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { NSString* scheme = [[request
  • 1