如何在程序中获知iphone 和 ipod的设备型号,因为5的屏幕比较大,我需要在布局上做一些处理,谢谢
虽然不懂ios,不过我google还是耍得很利害的 呵呵
Complete List of iOS User-Agent Strin...
Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A405 Safari/8536.25
Apple-iPhone5C1/1001.405 iPhone 5 GSM 6.0 10A405 Sept 19, 2012
以下代码是提取user-agent的
来自stackoverflow
UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectZero]; NSString *uaString = [webView stringByEvaluatingJavaScriptFromString:"@navigator.userAgent"];
2 回答1.1k 阅读
1 回答1k 阅读✓ 已解决
1 回答2.7k 阅读
1 回答1.4k 阅读
1.7k 阅读
1 回答1.1k 阅读
1 回答939 阅读
https://github.com/erica/uidevice-ext...
其中UIDevice-Hardware这个Category就能解决你的问题。