1、读取和设置ua
@weakify(self)
[self.webView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id result, NSError *error) {
@strongify(self)
NSString *newAgent = result;
//进行相关处理
self.webView.customUserAgent = newAgent;
)];