I use UIWebView in my app and it all worked fine in Xcode4,5,6 simulator. but not for Xcode 7 simulator, I don't know why, there is no warning or error in simulator, and the screen is just showing blank page. Please help me. Thanks.
#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.
}