Sasha Goldshtein
CTO, SELA Group

@goldshtn
blog.sashag.net

First Steps in iOS
Development

© Copyright SELA software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com
The iOS Platform

Apps

• 877,013+ of them 

Cocoa
Touch

• UI, gestures, view
navigation, media

Core Services

• Location,
threading, HTTP

Darwin (kernel)

• Drivers,
security
Platform Philosophy
User

Developer

Apple

• Consistent
interface
metaphors
• Always at
home, on any
device and in
any app
• Seamless
sync, backup,
purchase

• Strong push
to object
orientation
• Just one
language
(Objective C)
• Strong
separation of
concerns in
UI – MVC

• Full control
over the
ecosystem,
hardware and
software
• Ultimate
arbitrator on
whether an
app is a fit for
the App Store
iOS Devices and Versions
September 2013:
≈95% of iOS devices
run iOS 6

iPhone
3GS
• iOS 3
• iOS 4

Original
iPad

iPhone 5
iPhone
4/4S
• iOS 5

• iOS 6

iPhone
5c/5s
• iOS 7
Devices and Resolutions
iPhone
3/3GS

iPhone
4/4S

iPhone
5/5c/5s

iPad
1/2

iPad
Mini

iPad
3/4

3.5”

3.5”

4”

9.7”

7.9”

9.7”

320 480

640 960

640 1136

1024 768

1024 768

2048 153
6
Developing for iOS

UIKit

Xcode

Objective
C
self.title = [NSString initWithFormat:@"%d", n];
[button setTitle:self.title forState:UIControlStateNormal];
Our First iOS App

Demo
Project Components
Generated files:
Application delegate
Initial view controller
Main storyboard
Property list
File for localizable strings
Application icons

Xcode also adds basic
frameworks to your app
iOS MVC Fundamentals
View
• Draws itself
on the
screen
• Contains
generic UIrelated data

View
Controller
• Creates and
coordinates
views
• Populates
views and
reflects
changes to
the model

Model
• UI-agnostic
classes
• Can be a
bunch of
objects, a
database, a
file, an
Internet
service
Outlets and Actions
Xcode connects views and controllers
Controller manipulates views through outlets
Controller receives events through actions

@interface MyViewController : UIViewController
@property (nonatomic, weak) IBOutlet UITextField *petName;
- (IBAction)getQuote;
@end
Connecting UI to Code

Demo
iOS Navigation Types
Tab bar controller
Navigation controller
Storyboards
The storyboard describes your application’s
view controllers and connects them with
segues
Passing Parameters
Usually the source view controller sets
properties or calls methods on the destination
view controller

- (void)prepareForSegue:(UIStoryboardSegue *)segue
sender:(id)sender
{
MySecondVC *vc = segue.destinationViewController;
vc.itemToDisplay = [self selectedItem];
vc.delegate = self; // For callbacks
}
Storyboards and Segues

Demo
Summary
Objective C fundamentals
View controllers, views, outlets, actions
Storyboards, segues
It’s just another
{language, IDE, UI framework}
The rest is just details: data, networking,
settings, table views, styling, …
Questions
Sasha Goldshtein
CTO, SELA Group

@goldshtn
blog.sashag.net

First Steps in iOS Development