标签:setup content elf csdn rect s2d context dir article
http://blog.csdn.net/magicpang/article/details/50014373
先复制过来备份,暂时未测试
- (void)setupWebView {
if (!self.uiWebView) {
self.uiWebView = [[[UIWebView alloc] init] autorelease];
self.uiWebView.delegate = self;
}
if (!self.uiWebView.superview) {
auto view = cocos2d::Director::getInstance()->getOpenGLView();
auto eaglview = (CCEAGLView *) view->getEAGLView();
[eaglview addSubview:self.uiWebView];
}
}
- (void)setupWebView {
if (!self.uiWebView) {
self.uiWebView = [[[UIWebView alloc] init] autorelease];
self.uiWebView.delegate = self;
// 15/7/17 add
[self.uiWebView setOpaque:NO];
[self.uiWebView setBackgroundColor:[UIColor clearColor]];
}
if (!self.uiWebView.superview) {
auto view = cocos2d::Director::getInstance()->getOpenGLView();
auto eaglview = (CCEAGLView *) view->getEAGLView();
[eaglview addSubview:self.uiWebView];
}
}
style=""
/cocos2d/cocos/ui/UIWebViewImpl-ios.mm
public Cocos2dxWebView(Context context, int viewTag) {
this.setBackgroundColor(0); // 设置背景色
//this.getBackground().setAlpha(0); // 设置填充透明度 范围:0-255
标签:setup content elf csdn rect s2d context dir article
原文地址:http://www.cnblogs.com/zhangfeitao/p/7081134.html