ios获取UserAgent

    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
    NSString *userAgent = [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
    NSLog(@"userAgent=%@",userAgent);

 

posted @ 2016-06-06 13:54  lear  阅读(478)  评论(0编辑  收藏  举报