<span id="Label3"></p><p><p>IPhone6 and Iphone6plus mainland have been on sale for some time, you can see IPhone6 adaptation of Apple has been done, but if you are reading software, you can not really adapt to the time, you will see the font will be magnified, feel not very comfortable. Then the question comes, how to judge is iPhone6?</p></p><p><p>I tried the method of judging IPhone5 before:</p></p><p><p></p></p><strong><strong>[objc]</strong></strong>View Plaincopy<object id="ZeroClipboardMovie_1" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><object id="ZeroClipboardMovie_1" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><param name="src" value="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf"><param name="loop" value="loop"><param name="menu" value="false"><param name="quality" value="best"><param name="allowscriptaccess" value="always"><param name="allowfullscreen" value="false"><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer"><param name="flashvars" value="id=1&width=18&height=18"><param name="wmode" value="transparent"></object></object> <ol class="dp-objc" start="1"> <ol class="dp-objc" start="1"> <li class="alt">[uiscreen<span class="vars"> mainscreen]</span></li> </ol> </ol><p><p><br>At that time IPhone5 size for 640*1136 I get the information is</p></p><p><p></p></p><strong><strong>[objc]</strong></strong>View Plaincopy<object id="ZeroClipboardMovie_2" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><object id="ZeroClipboardMovie_2" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><param name="src" value="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf"><param name="loop" value="loop"><param name="menu" value="false"><param name="quality" value="best"><param name="allowscriptaccess" value="always"><param name="allowfullscreen" value="false"><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer"><param name="flashvars" value="id=2&width=18&height=18"><param name="wmode" value="transparent"></object></object> <ol class="dp-objc" start="1"> <ol class="dp-objc" start="1"> <li class="alt"><span class="comment"><UIScreen:0x16582290; bounds = {{0, 0}, {320, 568}}; mode = <UIScreenMode:0x16581c60; size = 640.000000 x 1136.000000>></span></li> </ol> </ol><p><p></p></p><p><p>I also used the same method to judge the iPhone6, but I found that the information I received Is:</p></p><p><p></p></p><strong><strong>[objc]</strong></strong>View Plaincopy<object id="ZeroClipboardMovie_3" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><object id="zeroclipboardmovie_3" width="up" height="align=" "middle" bgcolor="#ffffff" data="/http static.blog.csdn.net/scripts/zeroclipboard/zeroclipboard.swf " type=" Application/x-shockwave-flash "><param name=" SRC " value=" http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf "> <param name="loop" value="loop"><param name="menu" value="false"><param name="quality" value="best"><param Name="allowscriptaccess" value="always"><param name="allowfullscreen" value="false"><param name="pluginspage" value=" Http://www.macromedia.com/go/getflashplayer "><param name=" flashvars " value=" id=3&width=18&height=18 ">< param name= "wmode" value= "transparent" > </object></object> <ol class="dp-objc" start="1"> <ol class="dp-objc" start="1"> <li class="alt"><span class="comment"><UIScreen:0x1456ce90; bounds = {{0, 0}, {320, 568}}; mode = <UIScreenMode:0x1464f990; size = 640.000000 x 1136.000000>></span></li> </ol> </ol><p><p>There's no difference between this and iPhone5, and I think this might be a way for Apple to fit in, and when you're not ready to formally start adapting to the IPhone6 and IPhone6 plus, Apple uses a magnified Approach.</p></p><p><p></p></p><p><p>So you can use this approach when you're not ready for a real fit:</p></p><strong><strong>[objc]</strong></strong>View Plaincopy<object id="ZeroClipboardMovie_4" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><object id="ZeroClipboardMovie_4" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><param name="src" value="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf"><param name="loop" value="loop"><param name="menu" value="false"><param name="quality" value="best"><param name="allowscriptaccess" value="always"><param name="allowfullscreen" value="false"><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer"><param name="flashvars" value="id=4&width=18&height=18"><param name="wmode" value="transparent"></object></object><p class="alt"><p class="alt">-(nsstring*) devicestring</p></p><p><p>{</p></p><p><p><span class="comment">//need #import "sys/utsname.h"</span></p></p><p><p><span class="comment"> </span> <span class="keyword">struct Utsname systemInfo; </span></p></p><p class="alt"><p class="alt">Uname (&systeminfo);</p></p><p class="alt"><p class="alt"><span class="keyword">nsstring *platform = [nsstring<span class="vars"> stringwithcstring:systeminfo<span class="xcodeconstants">. Machine<span class="vars"> Encoding:nsutf <span class="xcodenumber"> 8StringEncoding]; </span></span></span></span></span></p></p><p class="alt"><p class="alt"><span class="keyword"><span class="vars"><span class="xcodeconstants"><span class="vars"><span class="xcodenumber"> </span></span></span></span></span> <span class="keyword">return platform; </span></p></p><p class="alt"><p class="alt">}</p></p><p><p>The result is: iphone7,2</p></p><p><p></p></p><p><p>Only need to judge is iphone7,2 can know this is iPhone6.</p></p><p><p>As for IPhone6 Plus is iphone7,1 so the judgment is IPhone6 plus.</p></p><p><p></p></p><p><p>Method 2: When you really start adapting to IPhone6 and IPhone6 plus</p></p><p><p>Use:</p></p><p><p></p></p><strong><strong>[objc]</strong></strong>View Plaincopy<object id="ZeroClipboardMovie_5" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><object id="ZeroClipboardMovie_5" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><param name="src" value="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf"><param name="loop" value="loop"><param name="menu" value="false"><param name="quality" value="best"><param name="allowscriptaccess" value="always"><param name="allowfullscreen" value="false"><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer"><param name="flashvars" value="id=5&width=18&height=18"><param name="wmode" value="transparent"></object></object> <ol class="dp-objc" start="1"> <ol class="dp-objc" start="1"> <li class="alt">[uiscreen<span class="vars"> mainscreen]</span></li> </ol> </ol><p><p>To judge is also Possible. Of course it is possible to use one method.</p></p><p><p>IPhone6 750*1334<br>IPhone6 Plus 1242*2208</p></p><p><p> Nt_ios notes-judging IPhone6 </p> </p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service