解决方案 »
- app在运行过程中隐藏状态栏但存在了黑影该怎么去除??
- 如何下载sample code,例如CrashLanding?
- 【转载】核心动画编程指南【中文完整翻译版 -Core Animation Programming Guide
- 高手在否-iOS gzip无法解压缩,
- 资深果粉发声:上哪个网站买iphone6更划算?
- 如何开发类似美团一样的APP
- Xcode7上传app时报错
- 求大神解决,已经试了很多方式了,就是不行;卡死了。急死本宝宝了。谢谢各位大神!
- gpuimage 人脸识别
- UIDocumentInteractionController不走代理方法!!
- iOS常驻后台开发
- for 循环siganl sigabrt 错误 -。-求帮忙
[view stopLoading];
[view setHidden:YES];
UIWebView* webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 80, 320, 480)];
webView.delegate = self;
webView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
webView.suppressesIncrementalRendering = YES;
webView.opaque = YES;
[self.view addSubview:webView];
NSURL *objUrl = [NSURL URLWithString:@"http://www.tudou.com/"];
NSURLRequest *request = [NSURLRequest requestWithURL:objUrl];
[webView loadRequest:request];
view = webView;
}程序里就有一个按钮,点击创建一个webview,之前的隐藏,创建4个就崩溃了 报内存警告了
-(void)viewDidLoad {
[super viewDidLoad];
webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 80, 320, 480)];
webView.delegate = self;
webView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
webView.suppressesIncrementalRendering = YES;
webView.opaque = YES;
[self.view addSubview:webView];
}- (IBAction)switchWebView:(id)sender {
NSURL *objUrl = [NSURL URLWithString:@"http://www.tudou.com/"];
NSURLRequest *request = [NSURLRequest requestWithURL:objUrl];
[webView loadRequest:request];
}