IOS 8 at a glance

Source: Internet
Author: User

IOS 8 Kind

1. The bounds of UIWindow is changed (the window itself rotates)

The bounds of Windows before iOS 7 does not change with the direction, but after iOS 8, as the device rotates, window.bounds.size.width and window.bounds.size.height change accordingly.

To do a very simple test, the code is as follows:

-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchoptions {//Override point for customization after application launch.[[Nsnotificationcenter Defaultcenter] addobserver:self selector:@s                                                Elector (orientationchanged:) name:uideviceorientationdidchangenotification Object: nil]; returnYES;}- (void) Orientationchanged: (nsnotification*) Noti {uideviceorientation orientation=[Uidevice currentdevice].orientation; NSString*orientationdes =Nil; Switch(orientation) { CaseUideviceorientationlandscapeleft:orientationdes=@"Uiinterfaceorientationlandscaperight";  Break;  CaseUideviceorientationlandscaperight:orientationdes=@"Uiinterfaceorientationlandscapeleft";  Break;  CaseUideviceorientationportrait:orientationdes=@"uiinterfaceorientationportrait";  Break;  CaseUideviceorientationportraitupsidedown:orientationdes=@"Uiinterfaceorientationportraitupsidedown";  Break; default: Orientationdes=@"";  Break; } NSLog (@"System ver:%@, \rorientaion:%@, \rwindow bounds:%@", [Uidevice currentdevice].systemversion, Orientationdes, Nsstringfromcgrect (self.window.bo unds));}

The sample code is simple, create a new project, and then add the above code directly in the delegate.

Running results on IOS 8 are:

?
1 2 3 4 5 6 7 8 9 10 11 12 2014-06-04 09:26:32.016 svios8[4143:61114] System ver:8.0, orientaion:uiinterfaceorientationlandscaperight, window bounds : {{0, 0}, {480}} 2014-06-04 09:26:34.788 svios8[4143:61114] System ver:8.0, orientaion:uiinterfaceorientationportrait, window Bounds: {{0, 0}, {480, + =}} 2014-06-04 09:26:35.791 svios8[4143:61114] System ver:8.0, orientaion:uiinterfaceorientationlandscapeleft, window bounds: {{0, 0}, {, 480}} 2014-06-04 09:26:47.468 svios8[4143:61114] System ver:8.0, orientaion:uiinterfaceorientationportraitupsidedown, window bounds: {{0, 0}, {480, +.}}

IOS 7 and previous versions run as follows:

?
1 2 3 4 5 6 7 8 9 10 11 12 2014-06-04 09:39:00.527 svios8[4380:70b] System ver:7.0.3, orientaion:uiinterfaceorientationlandscaperight, window bounds : {{0, 0}, {480}} 2014-06-04 09:39:00.895 svios8[4380:70b] System ver:7.0.3, orientaion:uiinterfaceorientationportrait, window Bounds: {{0, 0}, {480}} 2014-06-04 09:39:01.225 svios8[4380:70b] System ver:7.0.3, orientaion:uiinterfaceorientationlandscapeleft, window bounds: {{0, 0}, {, 480}} 2014-06-04 09:39:11.004 svios8[4380:70b] System ver:7.0.3, orientaion:uiinterfaceorientationportraitupsidedown, window bounds: {{0, 0}, {$, 480}}

By contrast, we can see clearly the changes in UIWindow's policy when dealing with rotations in iOS 8, although there are bugs in the existing project layout due to different versions of the previous version, but you can see that the processing in iOS 8 is more in line with our expectations, and we get the width in vertical < height, in the horizontal is width > height, which is consistent with the principle of WYSIWYG.

aside, whether it's iOS 7 or earlier, and the latest iOS 8, all viewcontroller bounds are correct, so just stick to one principle " All layouts are based on the VC.view.bounds layout, so your app's display is all right. ”

Of course, if you have any view is not managed by the VC, directly added to the window, then the tragedy, please add code to support alone.

  Good news: all iOS 7 SDK-based programs, window's mechanism also follows the original mechanism, that is, can be smoothed over to the iOS system, all the interface layout is normal. I have to say that Apple is a great company.

  

2. Precautions for installing the iOS 8 beta release

Official Notes Address: Http://adcdownload.apple.com//wwdc_2014/ios_8_beta_wg4j9a/ios_beta_software_installation_guide.pdf

The main meaning is:

1) do not downgrade after upgrade, so before upgrading to think clearly

2) Do the backup work, because after all it is a beta version, there may be some instability, you may lose data during the upgrade process

3) Support equipment:

iphone 4s, iphone 5, iphone 5c, iphone 5s, IPod Touch (5th gen),
ipad 2, ipad with Retina display, ipad Air and ipad Mini

4) currently only support developer preview

5) Feedback problem address is as follows: https://developer.apple.com/bug-reporting/

  

3. QR Code Support

The Core Image Framework ( CoreImage.framework ) adds the following APIs:

    • Support for Custom Imagekernels

    • Added rectangle detection and two-dimensional code recognition function in image

Detailed Documentation: Core Image Reference Collection.

Note: This article, constantly updated, welcome to discuss iOS 8

If you feel that this article has helped you, please recommend to the friends around

Reprint please famous source, have any questions welcome message

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.