Developing an Universal iOS app

60 %
40 %
Information about Developing an Universal iOS app
Technology

Published on March 10, 2014

Author: wolcanus

Source: slideshare.net

Description

This presentation shows how to develop an universal iOS app or "convert" a existing one into universal. An universal app must work in iPad/iPod and iPhone.

Developing an Universal iOS app Or converting a existing one into universal...

–Apple Developer Documentation “A universal app is a single app that is optimized for iPhone, iPod touch, and iPad devices.”

Universal app setup • First you'll need to set project Devices as 'Universal'

–Morpheus “You take the blue pill -- the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill -- you stay in Wonderland and I show you how deep the rabbit-hole goes.”

ViewControllers • Consider defining separate view controller classes for iPhone and iPad devices. • If you use a single view controller class for both platforms, your code must support both iPhone and iPad screen sizes.

Views • Consider using separate sets of views for iPhone and iPad devices. For custom views, this means defining different versions of your class for each device. • If you choose to use the same custom view for both devices, make sure your drawRect: and layoutSubviews methods especially work properly on both devices.

Using Runtime checks if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {! // The device is an iPad running iOS 3.2 or later.! }! else {! // The device is an iPhone or iPod touch.! }

Drawing objects self.wrapper.frame = CGRectMake(15, 10, self.frame.size.width - 30, 135);

Using different .XIB for the same ViewController

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {! self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];! } else {! self.view = [[[NSBundle mainBundle] loadNibNamed:@"DDSigninFormViewController~ipad" owner:self options:nil] objectAtIndex:0];! }

Live demo/coding

Thank you! @wolcanus me@wolcan.us

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

Better code: Develop universal Apps for iOS devices ...

Final thoughts. There are pros and cons in developing universal apps. From a maintenance and support perspective, one code base is easier to manage.
Read more

Creating a Universal iOS App Tutorial - Cory Wiles Blog

Creating a Universal iOS App Tutorial. Just when I thought I had a somewhat decent grasp on developing and deploying iOS apps ... universal apps from the ...
Read more

iphone - Strategy for developing Universal IOS application ...

I have an iPhone application available in appstore. Now i would like to develop Universal version of the same app. The iPad version of the current ...
Read more

„Developing iOS 9 Apps with Swift“ - Kostenloser Kurs ...

Developing iOS 9 Apps with Swift von Stanford. Weiteres aus dieser Einrichtung anzeigen. Klicken Sie auf „In iTunes ansehen“, um einen iTunes U Kurs zu ...
Read more

Developing iPad Apps - Apple Developer

Developing iPad Apps. iOS 9 SDK includes over 5000 new APIs and services that are enabling new ... Developing iPad Apps; Platforms. iOS; OS X; watchOS; tvOS;
Read more

What is good practice to use Storyboards while developing ...

... What's the best workflow for maintaining a universal iPhone/iPad app ... to use Storyboards while developing a ... iOS apps like Evernote or Dropbox ...
Read more

Start Developing iOS Apps (Swift): Jump Right In

Jump Right In. Start Developing iOS Apps (Swift) is the perfect starting point for creating apps that run on iPhone and iPad. View this set of ...
Read more

iOS Programming Tutorial: Creating Universal App using Xcode 5

iOS Programming Tutorial: Creating a Universal App. ... Adding AirDrop File Sharing Feature to Your iOS Apps. Next Post Announcing the iOS Game Starter Kit.
Read more

Developing Universal Windows Apps with C# and XAML | Channel 9

Developing Universal Windows Apps with C# and XAML. Subscribe to this Series 13 parts reddit. Tweet ... when developing for the two platforms.
Read more