UIwebview 如何改User-Agent,让ipad uiwebview模拟iphone

NSMutableURLRequest *urlRequest = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString: @"http://dailynews.yahoo.co.jp/smartphone"]];

[urlRequest setValue: @"iPhone" forHTTPHeaderField: @"User-Agent"]; 

[iTaxiUIView.citWebView loadRequest:urlRequest];

posted on 2011-09-26 11:23  海南一哥  阅读(120)  评论(0编辑  收藏  举报

导航