开发者

web view in cocso2d

开发者 https://www.devze.com 2023-02-15 12:18 出处:网络
how can I use web view in coc开发者_如何学编程so2dwebView = [[WebView alloc] initWithFrame:NSMakeRect(0,0,580,400)

how can I use web view in coc开发者_如何学编程so2d


webView = [[WebView alloc] initWithFrame:NSMakeRect(0,0,580,400) 
                               frameName:@"mainFrame" 
                               groupName:nil];
[webView setAcceptsTouchEvents:YES];

[view addSubview:webView];

[[CCDirector sharedDirector].openGLView addSubview:view];

NSURL*url=[NSURL URLWithString:@"http://www.google.com"];
NSURLRequest*request=[NSURLRequest requestWithURL:url];
[[webView mainFrame] loadRequest:request];
0

精彩评论

暂无评论...
验证码 换一张
取 消