Presentation at ConFoo 2014 on iOS Development. Discussing the basic components of the iOS ecosystem and building a basic todo list manager app with Xcode and storyboards.
2. The iOS Platform
Apps
• 877,013+ of them
Cocoa
Touch
• UI, gestures, view
navigation, media
Core Services
• Location,
threading, HTTP
Darwin (kernel)
• Drivers,
security
3. 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
4. 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
8. 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
9. 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
10. 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