WebView Background Settings Transparent (iOS Android)

Source: Internet
Author: User
Tags set background

http://blog.csdn.net/magicpang/article/details/50014373

Copy it back, it's not tested yet.

-(void) Setupwebview { Span class= "synstatement" style= "color: #804000" >if (!self.uiwebview) {self.uiwebview = [[[UIWebView alloc] init]        Autorelease];    Self.uiWebView.delegate = self; } if (!self.uiwebview.superview) {auto view = cocos2d::D irector::getinstance ()->getopenglview ();        auto Eaglview = (Cceaglview *) View->geteaglview ();    [Eaglview AddSubview:self.uiWebView]; }}
-(void) Setupwebview {    if (!self.uiwebview) {        Self.uiwebview = [[[UIWebView alloc] init] autorelease];< C4/>self.uiwebview.delegate = self;                //15/7/17 Add        [Self.uiwebview Setopaque:no];        [Self.uiwebview Setbackgroundcolor:[uicolor Clearcolor];    }    if (!self.uiwebview.superview) {        auto view = cocos2d::D irector::getinstance ()->getopenglview ();        Auto Eaglview = (Cceaglview *) View->geteaglview (); [Eaglview AddSubview:self.uiWebView]; }}
Style= ""
/cocos2d/cocos/ui/uiwebviewimpl-ios. mm  

Android Cocos2dxwebview.java

Public Cocos2dxwebview (context context, int viewtag) {

this.setbackgroundcolor (0); //Set background color

This.getbackground (). Setalpha (0); Set fill transparency Range: 0-255

WebView Background Settings transparent (iOS Android)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.