在UIWebView中加载Google Map时出现内存警告 [英] Memory warning when loading google map in UIWebView

查看:73
本文介绍了在UIWebView中加载Google Map时出现内存警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,UIWebView在使用此功能时会加载Google地图 方向url ==

In my app UIWebView loads Google maps, while using this Direction url == http://maps.google.com/maps?f=d&hl=en&geocode=&saddr=37.774930,-122.419415&daddr=37.7655277,-122.421811&ie=UTF8&z=12,

它抛出接收到的内存警告",并且我的应用程序崩溃.

it throws "Received memory warning" and my app crash.

UIWebview是我的视图控制器中UIView的子视图.我把它当作IBOutlet.

UIWebview is a subview of UIView in my view controller. I took it as a IBOutlet.

请帮我,这给我的应用带来了很多麻烦.

Pls help me with this, it creates lots of trouble for my app.

预先感谢您...

推荐答案

.h ///---- #import

.h ///---- #import

@interface WebsiteViewController : UIViewController <UIWebViewDelegate>

{

IBOutlet UIWebView *webView;

}

@property(nonatomic,retain) IBOutlet UIWebView *webView;

.m ///----

.m ///---

-(void)viewDidLoad {
     NSURLRequest *request = [[NSURLRequest alloc] initWithURL:@"url"];
[self.webView setScalesPageToFit:YES];
[self.webView loadRequest:request];
[request release]; 
}

这篇关于在UIWebView中加载Google Map时出现内存警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆