我在我的应用程序中使用UIWebView,它在
Xcode4,5,6模拟器中都运行良好.但不适用于Xcode 7模拟器,我不知道为什么,模拟器中没有警告或错误,而且屏幕只显示空白页面.请帮我.谢谢.
#import "IndexViewController.h" @interface IndexViewController () @end @implementation IndexViewController - (void)viewDidLoad { [super viewDidLoad]; NSString *urlString = nil; NSString *languageCode = [[NSLocale preferredLanguages] objectAtIndex:0]; if ([languageCode isEqualToString:@"zh-Hans"]) { urlString = @"http://www.originoftime.net/index-cn"; }else if ([languageCode isEqualToString:@"zh-Hant"]) { urlString = @"http://www.originoftime.net/index-cn"; }else{ urlString = @"http://www.originoftime.net/index-en"; } NSURL *url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]]; NSURLRequest *urlrequest = [NSURLRequest requestWithURL:url]; [_Index loadRequest:urlrequest]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. }