How to Port Your App to the iPhone 6, iPhone 6 Plus and iOS 8: Top 10 Tips
Check out our top 10 tips about how to port your apps to iOS 8 and the new devices and screen sizes! By Jack Wu.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
How to Port Your App to the iPhone 6, iPhone 6 Plus and iOS 8: Top 10 Tips
20 mins
- Getting Started
- Section 1 – Supporting the New Screen Sizes
- Tip 1: Adopting Adaptive Layout and the Universal Storyboard
- Tip 2: Enabling Fullscreen Mode and the Launch Screen File
- Tip 3: Better-Than Retina Displays and @3x Images
- Section 2 – User Permission Changes
- Tip 4: Fix Location Permissions
- Tip 5: Fix Notification Registration
- Tip 6: Kindly Asking for Permissions…Again
- Section 3 – Beyond Porting
- Tip 7: Unleash The Power of Swift
- Tip 8: Significant API Deprecations/Updates
- Tip 9: Cool New Visual Effects
- Tip 10: A New World of Options
- Where To Go From Here?
Tip 8: Significant API Deprecations/Updates
iOS 8 updates a few fundamental pieces of Cocoa Touch. UIAlertView
, UIActionSheet
and UISearchDisplayController
all have new replacements that are much more pleasant to work with, and UIPresentationController
now has much-needed control over the view controller presentation process.
UIAlertController replaces both UIAlertView
and UIActionSheet
with a clean, block-based interface. A simple usage example is:
UIAlertController * alert = [UIAlertController alertControllerWithTitle:@"Are you sure?" message:@"Once deleted this item cannot be recovered." preferredStyle:UIAlertControllerStyleAlert];
[alert addAction: [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { [self deleteItem ]}];
[alert addAction: [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:{}];
[self presentViewController:alert animated:YES completion:nil];
As you can see, you don’t need a delegate anymore and you show it using -presentViewController:
that just feels right. UIAlertController
also brings new functionality like multiple buttons and simple configuration of text fields in alerts.
Take a look at the great article on UIAlertController from NSHipster to learn more.
UIPresentationController gives you all the control you could ever want when presenting a view controller. You can fully adjust the chrome, position and animations of presentations in a clean, reusable manner.
Check out the official documentation or Chapter 6, “Introducing Presentation Controllers” in iOS 8 by Tutorials to learn all about presentation controllers.
Tip 9: Cool New Visual Effects
One of the beloved additions in iOS 7 was the blur effect. Apple finally delivered this API in iOS 8 with the brand new UIVisualEffectView and UIVibrancyEffectView classes!
UIVisualEffectView is an effective way to de-emphasize the background and UIVibrancyEffectView makes the foreground really pop. They are optimized for performance, but if overused they will slow down your app’s performance, so be careful.
If you want to get started with visual effects hop right in to our iOS 8 Visual Effects Tutorial.
Tip 10: A New World of Options
This tutorial is about making your app run on iOS 8, and if you’ve followed the tips up to now, consider it a job well done. The good (bad?) news is this is still just the beginning, iOS 8 has just so much to offer!
There are numerous ways to extend the functionality of your app in iOS 8, and these were not possible before. Here are just a few more ways you can spice up your app:
- Use WatchKit and create a Watch Extension for your app.
- Create a Today Extension for users to see information in their notification panel.
- Use Document Providers for users to share files between apps.
- Add Actions to your notifications.
- Integrate Touch ID to let users authenticate with ease.
And much, much more… make sure you take a look at iOS 8 Tutorials and WatchKit by Tutorials if you want to dig deeper into what iOS 8 and WatchKit have to offer.
Where To Go From Here?
I hope that you enjoyed this, and found these tips useful.
Now go on, dear friend, and create something joyful :]
This tutorial was quite crammed, and I hope it made sense.
Here are all the links, for a quick reference:
With all these new tools it feels like a beginning, once more.
- Supporting Multiple iOS Versions and Devices
- Storyboards Tutorial
- Auto Layout Tutorial
- Our Swift Tutorials
- Our iOS 8 Tutorials
- Using Swift with Cocoa and Objective-C
- UIAlertController on NSHipster
- UIPresentationController Documentation
- iOS 8 Visual Effects
- iOS 8 by Tutorials
- WatchKit by Tutorials
- Swift by Tutorials Bundle
Please share your thoughts and comments below, but remember, no fighting!