Monday, October 22, 2012

Updates in iOS 6


A lot has happened in iOS 6 and apple has a document which you may read it from hereThe above document will guide you out regarding the changes that has happened in iOS technology.

Few of the changes i am mentioning it down so that you can read them as i feel that those are the important changes in iOS6.

UIKIT Framework

·         In iOS 5.1, the UISplitViewController class adopts the sliding presentation style when presenting the left view (previously seen only in Mail). This style is used when presentation is initiated either by the existing bar button item provided by the delegate methods or by a swipe gesture within the right view. No additional API adoption is required to obtain this behavior, and all existing APIs—including that of the UIPopoverController instance provided by the delegate—will continue to work as before. If the gesture would be insupportable in your app, setting the presentsWithGesture property of your split view controller to NO disables the gesture. However, disabling the gesture is discouraged because its use preserves a consistent user experience across all apps.
·         In iOS 6, changes have been introduced so that you no longer need to set a delegate and implement a method for single-finger and single-tap gesture recognizers. This makes them work well with theUIControl objects.
·         In iOS 6 and later, the UIWebView class paints its contents asynchronously.
·         Autorotation is changing in iOS 6. In iOS 6, the shouldAutorotateToInterfaceOrientation: method of UIViewController is deprecated. In its place, you should use thesupportedInterfaceOrientationsForWindow: and shouldAutorotate methods.
·         More responsibility is moving to the app and the app delegate. Now, iOS containers (such as UINavigationController) do not consult their children to determine whether they should autorotate. By default, an app and a view controller’s supported interface orientations are set to UIInterfaceOrientationMaskAll for the iPad idiom andUIInterfaceOrientationMaskAllButUpsideDown for the iPhone idiom.
·       A view controller’s supported interface orientations can change over time—even an app’s supported interface orientations can change over time. The system asks the top-most full-screen view controller (typically the root view controller) for its supported interface orientations whenever the device rotates or whenever a view controller is presented with the full-screen modal presentation style. Moreover, the supported orientations are retrieved only if this view controller returns YES from its shouldAutorotate method. The system intersects the view controller’s supported orientations with the app’s supported orientations (as determined by the Info.plist file or the app delegate’s application:supportedInterfaceOrientationsForWindow: method) to determine whether to rotate.
·         The system determines whether an orientation is supported by intersecting the value returned by the app’s supportedInterfaceOrientationsForWindow: method with the value returned by thesupportedInterfaceOrientations method of the top-most full-screen controller.
·         The setStatusBarOrientation:animated: method is not deprecated outright. It now works only if the supportedInterfaceOrientations method of the top-most full-screen view controller returns 0. This makes the caller responsible for ensuring that the status bar orientation is consistent.
·         For compatibility, view controllers that still implement the shouldAutorotateToInterfaceOrientation: method do not get the new autorotation behaviors. (In other words, they do not fall back to using the app, app delegate, or Info.plist file to determine the supported orientations.) Instead, the shouldAutorotateToInterfaceOrientation: method is used to synthesize the information that would be returned by the supportedInterfaceOrientations method.
·         The willRotateToInterfaceOrientation:duration:, willAnimateRotationToInterfaceOrientation:duration:, and didRotateFromInterfaceOrientation: methods are no longer called on any view controller that makes a full-screen presentation over itself—for example, presentViewController:animated:completion:.
·         You should make sure that your apps are not using these methods to manage the layout of any subviews. Instead, they should use the view controller’s viewWillLayoutSubviews method and adjust the layout using the view’s bounds rectangle.
·         In iOS 6, the viewWillUnload and viewDidUnload methods of UIViewController are now deprecated. If you were using these methods to release data, use the didReceiveMemoryWarning method instead. You can also use this method to release references to the view controller’s view if it is not being used. You would need to test that the view is not in a window before doing this.
·         It is not supported to set values for the shadowOffset or shadowColor properties of a UILabel object if its attributedText property contains a valid attributed string. Instead, use theNSShadowAttributeName attribute of the attributed string to set the shadow.
·         Due to compatibility concerns, the NSBaselineOffsetAttributeName attribute is no longer supported in iOS 6.
·         The NSTextAlignmentNatural value is not supported. It will throw an exception when it is used with the textAlignment property of UILabel or is supplied as the alignment parameter to thedrawInRect:withFont:lineBreakMode:alignment: method of NSString.
·         The setContentStretch: method of UIView has been deprecated. To achieve the same effect, use the resizableImageWithCapInsets: method of UIImage and display the image with aUIImageView.
·         The resizableImageWithCapInsets: method of UIImage effectively resizes images by tiling. As a performance optimization, it uses stretching rather than tiling when the user would not be able to tell the difference, such as when a single column or row is being stretched. But in certain circumstances, the user might want to actually stretch some region of an image. In iOS 6, theresizableImageWithCapInsets:resizingMode: method allows the caller to specify a tiling or stretching resizing mode.
·         The UICollectionViewLayout class has changed:
·         The class now supports the customization of the animations created during rotation. The names of methods for customizing insert and delete animations have also changed, so the same hooks can be used for rotations as well as for insertions and deletions.
·         The class has changed some method names. Specifically, decoration views are no longer referred to by “reuse identifier” but rather by “element kind.” Apps that are using decoration views will need to modify their code and be rebuilt to accommodate this.
·         The bottom edge of a UILabel view is now different from its baseline.
Previously, Auto Layout was interpreting the bottom of a UILabel to be the same as its baseline. While convenient in many cases, it caused problems if you wanted to place the top edge of one label against the bottom edge of another. In such a scenario, the bottom label would overlap the top one, and descenders from the top label could crash into ascenders from the bottom label. Now, Auto Layout interprets UILayoutAttributeBottom as the bottom of the text box (presuming the label is not bigger than its intrinsic content size) and UILayoutAttributeBaseline as the baseline of the text. If you have already created code for laying out labels according to the bottom or center point, your text will move around a little and you will need to adjust your constraints.
·         Apps with table views in their nib or storyboard files, and that were built using previous versions of iOS 6 beta, will require a clean build with beta 3 and newer.
Landscape-only apps that invoke a portrait-only view controller (such as the Game Center login screen) will cause the app to crash.
Workaround:
1.    Apps should provide the delegate method application:supportedIntefaceOrientationsForWindow and ensure that portrait is one of the returned mask values.
2.    When a UIBNavigationController is involved, subclass the UINavigationController and overriding supportedInterfaceOrientations.

Simulator

·         No privacy alerts are displayed in iOS Simulator for apps that access Photos, Contacts, Calendar, and Reminders.
·         For this release, iOS Simulator does not support testing In-App Purchase. Please use a device to test your apps that use this feature.
·         When attempting to play an MP3 sound in Simulator, you will hear a popping sound instead.
I hope that by reading this post you have some clearance on iOS6.

6 comments:

  1. hi radix your concepts are great i really like ur blog..it helps me a lot ..

    if its possible can u plz provide me code for InAppPurchase with user authentication..means app should be free for some people as per user choice..for ex if a user wants a app to be free to those people who belongs to his community and rest all need to purchase it ..i really need it plz radix..thnks

    ReplyDelete
  2. Any tutorials for table view with grid and story boarding?
    Having problems with prepareForSeque ios6 simulator in Xcode.
    Keeps saying identifier missing

    ReplyDelete
  3. Sir, This post is really helpful.

    ReplyDelete
  4. I really like io6 version in iphones. In iOS 6, changes have been presented so that you no longer need to set a delegate and actualize a technique for single-finger and single-tap signal recognizers.

    ReplyDelete