SlideShare una empresa de Scribd logo
1 de 69
iOS Application Development
Overview of the iOS 7 Application
Development Architecture
These are confidential sessions - please refrain from streaming, blogging, or taking pictures
Session 7
Vu Tran Lam
IAD-2013
Start Developing iOS Apps Today
Creating iOS apps is fun and rewarding. If you're a new developer,
you might be wondering where to begin. This road map provides the
perfect starting point for iOS app development.
When you develop apps, you use the iOS software development kit
(SDK) and Xcode, Apple’s integrated development environment (IDE).
To make a great iOS app, you need to learn and do many things, but
the tools and iOS SDK make it easy to get a simple app running.
Let’s do the tutorial Your First iOS App.
Xcode provides tools to manage your entire development workflow-
from creating your app and designing your user interface, to testing,
optimizing, and shipping your app to the App Store.
Objective-C is an elegant object-oriented language that is used in all
iOS apps. You need to understand this language in order to use most
iOS application frameworks.
If you’ve learned enough about Objective-C to read and write basic
code, you can begin to think in terms of objects - OOP. To create an
iOS app, you need to know how to create, compare, query objects
and access objects in collections such as arrays.
iOS app consists of code that you write and frameworks provided by
Apple. A framework contains a library of methods that your app can use.
More than one app can access a framework library at the same time.
A design pattern solves a common software engineering problem.
Patterns are abstract designs, not code. When you adopt a design,
you adapt the general pattern to your specific needs.
Users expect iOS apps to be intuitive, interactive, and engaging. Think
about user experience as you design every aspect of your app, from
the features you choose to the way your app responds to a gesture.
Before you begin writing a line of code, you should make some
critical design decisions. Be as specific as possible about your app’s
purpose and features. Choose the kind of data model your app will
use. Decide on a user interface style for your app.
After completing your iOS App, if you want more and more iOS users
know and download your app, you must publish your app on the App
Store. To make a great app, you need to test it on actual devices, not
just in Simulator. To run an app on iOS-based devices, you need to
register your devices, create certificates that authorize developers to
sign an app, and create an app ID to identify the app.
While developing your apps, you’ll need easy access to detailed
technical information. Xcode makes that material available at your
fingertips while you're coding.
• Model-View-Controller
• Delegation
• Target-Action
• Block objects
• Sandboxing
Fundamental iOS Design Patterns & Techniques
Model-View-Controller
• By default, iOS apps are organized around the Model-View-
Controller design pattern.
• The Model-View-Controller (MVC) design pattern assigns objects in
an application one of three roles: model, view, or controller. The
pattern defines not only the roles objects play in the application, it
defines the way objects communicate with each other.
• MVC is central to a good design for a Cocoa Touch application.
Many objects in these applications tend to be more reusable, and
their interfaces tend to be better defined.
• Applications having an MVC design are also more easily extensible
than other applications.
Model-View-Controller
ViewModel
Controller
Assign objects in an application to one of three roles.
ViewModel
Controller
Model-View-Controller
Model objects encapsulate the data specific to an application and define
the logic and computation that manipulate and process that data, e.g: a
model object represent a character in game or a contact in address book.
Model View
Controller
Model-View-Controller
A view object is an object in an application that users can see. A view
object knows how to draw itself and can respond to user actions.
Model View
Controller
Model-View-Controller
A controller object acts as an intermediary between view and model
objects. In MVC, a controller object interprets user actions made in view
objects and communicates new or changed data to the model objects.
Model View
Controller
Model-View-Controller
ViewModel
Controller
It’s all about managing communication between 3 roles types
Model-View-Controller
ViewModel
Controller
Controllers can always talk directly to their Model.
update
Model-View-Controller
ViewModel
Controller
Controllers can also talk directly to their View.
outlet
update
update
Model-View-Controller
ViewModel
The Model and View should never speak to each other.
Controller
?
outlet
update
update
Model-View-Controller
ViewModel
Can the View speak to its Controller?
Controller
?
outlet
update
update
Model-View-Controller
ViewModel
action
target
The Controller can drop a target on itself.
Controller
outlet
update
update
Model-View-Controller
ViewModel
action
target
Then hand out an action to the View.
Controller
outlet
update
update
Model-View-Controller
ViewModel
action
target
The View sends the action when things happen in the UI.
Controller
outlet
update
update
Model-View-Controller
ViewModel
action
target
Sometimes the View needs to synchronize with the Controller.
should did
will
Controller
update
outlet
update
Model-View-Controller
ViewModel
action
target
The Controller sets itself as the View’s delegate.
delegate
should did
will
Controller
update
outlet
update
Model-View-Controller
ViewModel
action
target
The delegate is set via a protocol (i.e. it’s “blind” to class).
delegate
should did
will
Controller
outlet
update
update
Model-View-Controller
ViewModel
action
target
Views do not own the data they display.
delegate
should did
will
Controller
outlet
update
update
Model-View-Controller
ViewModel
Model-View-Controller
action
target
So, if needed, they have a protocol to acquire it.
delegate
should did
will
data
at
count
Controller
outlet
update
update
ViewModel
action
target
Controllers are almost always that data source (not Model!).
data
source
data
at
count
delegate
should did
will
Controller
outlet
update
update
Model-View-Controller
ViewModel
action
target
Controllers interpret/format Model information for the View.
data
source
data
at
count
delegate
should did
will
Controller
outlet
update
update
Model-View-Controller
ViewModel
action
target
Can the Model talk directly to the Controller?
data
source
data
at
count
delegate
should did
will
Controller
outlet
update
update
?
Model-View-Controller
ViewModel
So what if the Model has information to update or something?
action
target
data
source
data
at
count
delegate
should did
will
Controller
outlet
update
update
?
Model-View-Controller
ViewModel
It uses a “radio station”-like broadcast mechanism
action
target
notification
data
source
data
at
count
delegate
should did
will
Controller
outlet
update
update
notify
Model-View-Controller
Controllers (or other Model) “tune in” to interesting stuff.
action
ViewModel
target
notification
data
source
data
at
count
delegate
should did
will
Controllernotify outlet
update
update
Model-View-Controller
Key Objects in an iOS App
Delegation
• Delegation is the design pattern which facilitates the transfer
information and data from one object to another. In delegation, an
object called the delegate acts on behalf of, and at the request of,
another object.
• A prime example of delegation can be seen in the case of the
UIApplication class. The UIApplication class, of which every iOS
iPhone application must have one instance, is responsible for the
control and operation of the application within the iOS environment.
• The Application Delegate is a custom object created at app launch
time, usually by the UIApplicationMain function.
• The primary job of Application Delegate is to handle state
transitions within the app. For example, this object is responsible for
launch-time initialization and handling transitions to and from the
Managing App State Changes
• The app launch cycle
• Responding to interruptions
• Moving to the background
• Returning to the foreground
• The main run loop
The App Launch Cycle
The App Launch Cycle
The App Launch Cycle
The App Launch Cycle
Responding to Interruptions
Returning to the Foreground
The Main Run Loop
The main run loop of your app is responsible for processing all user-
related events. The UIApplication object sets up the main run loop at
launch time and uses it to process events and handle updates to view-
based interfaces.
Target-Action
• Target-action is a design pattern in which an object holds the
information necessary to send a message to another object when an
event occurs.
• The stored information consists of two items of data: an action
selector, which identifies the method to be invoked, and a target,
which is the object to receive the message.
• The message sent when the event occurs is called an action
message.
• For example, when a user interacts with a slider (action), it
generates a UIControlEventValueChanged control event. You
could use this event to update a label’s text to the current value
of the slider. In this case, the sender is the slider, the control
event is Value Changed, the action is updating the label’s text,
and the target is the controller file containing the label as an
IBOutlet.
• Action methods must have a conventional signature as
- (IBAction)doSomething:(id)sender;!
• UIKit framework allows three different forms of action selector:
- (void)action;
- (void)action:(id)sender;
- (void)action:(id)sender forEvent:(UIEvent *)event;
Target-Action
• Target-action is primarily a feature of
controls in both the Cocoa Touch and
Cocoa frameworks.
• A control is a user-interface object such
as a button, slider, or switch that users
manipulate (by tapping, dragging, and so
on) to signal their intention to an app.
• A Cocoa Touch control stores both
action and target; most Cocoa controls
are paired with one or more cell objects
that store target and action.
Target-Action
Block Objects
• Block objects are a C-level syntactic and runtime feature that allow
you to compose function expressions that can be passed as
arguments, optionally stored, and used by multiple threads.
• Declaring a block
float (^aBlock)(const int*, int, float);
• Creating a block
int (^oneFrom)(int);
oneFrom = ^(int anInt) {
return anInt - 1;
};
• Using block
printf("%dn", oneFrom(10));
Sandboxing
• All iOS apps are placed in sandboxes to protect the system and
other apps.
• The structure of the sandbox affects the placement of your app’s
files and has implications for data backups and some app-related
features.
• Concept of View Controller
• Visual Interfaces
• View Controllers manage Views
• Taxonomy of View Controllers
• Using Storyboards to design User Interface
Overview of View Controllers
• View controllers are a vital link between an app’s data and its visual
appearance. Whenever an iOS app displays a user interface, the
displayed content is managed by a view controller or a group of
view controllers coordinating with each other.
• View controllers are traditional controller objects in the Model-View-
Controller (MVC) design pattern, but they also do much more. View
controllers provide many behaviors common to all iOS apps.
About View Controllers
Visual Interfaces
Screens, Windows, and Views create Visual Interfaces.
• Each view controller organizes and controls a view
• View controllers are controller objects in the MVC pattern, but a
view controller also has specific tasks iOS expects it to perform.
• These tasks are defined by the UIViewController class that all view
controllers inherit from.
View Controllers Manage Views
• Each view controller organizes and controls a view
• View controllers are controller objects in the MVC pattern, but a
view controller also has specific tasks iOS expects it to perform.
• These tasks are defined by the UIViewController class that all view
controllers inherit from.
Taxonomy of View Controllers
Taxonomy of View Controllers
Using Storyboards to Design User Interface
Documentation
iOS App Programming Guide
https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/
Introduction/Introduction.html
Streamline Your App with Design Patterns
https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/chapters/
StreamlineYourAppswithDesignPatterns/StreamlineYourApps/StreamlineYourApps.html
Concepts in Objective-C Programming
https://developer.apple.com/library/ios/documentation/general/conceptual/CocoaEncyclopedia/Introduction/
Introduction.html
View Programming Guide
https://developer.apple.com/library/ios/DOCUMENTATION/WindowsViews/Conceptual/ViewPG_iPhoneOS/
Introduction/Introduction.html
many thanks
to
lamvt@fpt.com.vn
please
say
Stanford University
https://developer.apple.com
Developer Center
http://www.stanford.edu/class/cs193p
xin
chào
Next: Xcode 5 & Interface Builder for iOS 7 App

Más contenido relacionado

La actualidad más candente

MyAppconverter platform mappings
MyAppconverter platform mappings MyAppconverter platform mappings
MyAppconverter platform mappings Kamal Youbi
 
UI Design - Lessons Learned, Principles, and Best Practices
UI Design - Lessons Learned, Principles, and Best PracticesUI Design - Lessons Learned, Principles, and Best Practices
UI Design - Lessons Learned, Principles, and Best PracticesSamuel Chow
 
Sharepoint mobile version v2
Sharepoint mobile version v2Sharepoint mobile version v2
Sharepoint mobile version v2MJ Ferdous
 
How to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple WatchHow to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple WatchSoftTeco
 
ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門SwapSkills
 
Onboarding experience
Onboarding experienceOnboarding experience
Onboarding experienceKanika Gupta
 
App design process part II
App design process part IIApp design process part II
App design process part IINTUST
 
Mobile Blast - Mobile strategy for developers
Mobile Blast - Mobile strategy for developersMobile Blast - Mobile strategy for developers
Mobile Blast - Mobile strategy for developersJohn Jardin
 
Real-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppReal-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppMike Taylor
 
CSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android ApplicationCSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android ApplicationAhammad Karim
 
How to make an iPhone app
How to make an iPhone appHow to make an iPhone app
How to make an iPhone appVCube Works
 
iTunes App Store Submission Process
iTunes App Store Submission ProcessiTunes App Store Submission Process
iTunes App Store Submission ProcessAnscamobile
 
Hybrid mobile app development
Hybrid mobile app developmentHybrid mobile app development
Hybrid mobile app developmentChamil Madusanka
 
Appcelerator mobile. the doppelgänger to XPages
Appcelerator mobile. the doppelgänger to XPagesAppcelerator mobile. the doppelgänger to XPages
Appcelerator mobile. the doppelgänger to XPagesJohn Jardin
 
iPhone Development Quick Start
iPhone Development Quick StartiPhone Development Quick Start
iPhone Development Quick Startgnocode
 
Adobe AIR Development for the BlackBerry PlayBook
Adobe AIR Development for the BlackBerry PlayBookAdobe AIR Development for the BlackBerry PlayBook
Adobe AIR Development for the BlackBerry PlayBookKyle McInnes
 
Application for Data Sync Between Different geo Locations
Application for Data Sync Between Different geo LocationsApplication for Data Sync Between Different geo Locations
Application for Data Sync Between Different geo LocationsMike Taylor
 
iPhone University Developer Program
iPhone University Developer ProgramiPhone University Developer Program
iPhone University Developer ProgramJussi Pohjolainen
 
HTML5 로 iPhone App 만들기
HTML5 로 iPhone App 만들기HTML5 로 iPhone App 만들기
HTML5 로 iPhone App 만들기JungHyuk Kwon
 

La actualidad más candente (20)

MyAppconverter platform mappings
MyAppconverter platform mappings MyAppconverter platform mappings
MyAppconverter platform mappings
 
UI Design - Lessons Learned, Principles, and Best Practices
UI Design - Lessons Learned, Principles, and Best PracticesUI Design - Lessons Learned, Principles, and Best Practices
UI Design - Lessons Learned, Principles, and Best Practices
 
Sharepoint mobile version v2
Sharepoint mobile version v2Sharepoint mobile version v2
Sharepoint mobile version v2
 
How to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple WatchHow to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple Watch
 
ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門
 
Onboarding experience
Onboarding experienceOnboarding experience
Onboarding experience
 
App design process part II
App design process part IIApp design process part II
App design process part II
 
Mobile Blast - Mobile strategy for developers
Mobile Blast - Mobile strategy for developersMobile Blast - Mobile strategy for developers
Mobile Blast - Mobile strategy for developers
 
Real-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppReal-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet App
 
CSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android ApplicationCSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android Application
 
How to make an iPhone app
How to make an iPhone appHow to make an iPhone app
How to make an iPhone app
 
iTunes App Store Submission Process
iTunes App Store Submission ProcessiTunes App Store Submission Process
iTunes App Store Submission Process
 
Hybrid mobile app development
Hybrid mobile app developmentHybrid mobile app development
Hybrid mobile app development
 
Appcelerator mobile. the doppelgänger to XPages
Appcelerator mobile. the doppelgänger to XPagesAppcelerator mobile. the doppelgänger to XPages
Appcelerator mobile. the doppelgänger to XPages
 
iPhone Development Quick Start
iPhone Development Quick StartiPhone Development Quick Start
iPhone Development Quick Start
 
Adobe AIR Development for the BlackBerry PlayBook
Adobe AIR Development for the BlackBerry PlayBookAdobe AIR Development for the BlackBerry PlayBook
Adobe AIR Development for the BlackBerry PlayBook
 
Application for Data Sync Between Different geo Locations
Application for Data Sync Between Different geo LocationsApplication for Data Sync Between Different geo Locations
Application for Data Sync Between Different geo Locations
 
iPhone University Developer Program
iPhone University Developer ProgramiPhone University Developer Program
iPhone University Developer Program
 
HTML5 로 iPhone App 만들기
HTML5 로 iPhone App 만들기HTML5 로 iPhone App 만들기
HTML5 로 iPhone App 만들기
 
iOS App Development and Marketing
iOS App Development and MarketingiOS App Development and Marketing
iOS App Development and Marketing
 

Similar a Session 7 - Overview of the iOS7 app development architecture

Password security system for websites
Password security system for websitesPassword security system for websites
Password security system for websitesMike Taylor
 
Empower individuals with autism through coding
Empower individuals with autism through codingEmpower individuals with autism through coding
Empower individuals with autism through codinglivecode
 
Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Shubham Goenka
 
How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?Paul Cook
 
Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1Manoj Ellappan
 
Free advertising platform for businesses with IOS & Android Apps development
Free advertising platform for businesses with IOS & Android Apps developmentFree advertising platform for businesses with IOS & Android Apps development
Free advertising platform for businesses with IOS & Android Apps developmentMike Taylor
 
Free advertising platform for businesses with IOS & Android Apps development
Free advertising platform for businesses with IOS & Android Apps developmentFree advertising platform for businesses with IOS & Android Apps development
Free advertising platform for businesses with IOS & Android Apps developmentMike Taylor
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobilenaral
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the informationToushik Paul
 
PukaPuka Presentation
PukaPuka PresentationPukaPuka Presentation
PukaPuka PresentationDevanshMaurya
 
Community App for Promoting Cross-Cultural Interaction
Community App for Promoting Cross-Cultural InteractionCommunity App for Promoting Cross-Cultural Interaction
Community App for Promoting Cross-Cultural InteractionMike Taylor
 
Community App for Promoting Cross-Cultural Interaction
Community App for Promoting Cross-Cultural InteractionCommunity App for Promoting Cross-Cultural Interaction
Community App for Promoting Cross-Cultural InteractionMike Taylor
 
Loyalty & Rewards Points Application on your mobile, iPhone, Android
Loyalty & Rewards Points Application on your mobile, iPhone, AndroidLoyalty & Rewards Points Application on your mobile, iPhone, Android
Loyalty & Rewards Points Application on your mobile, iPhone, AndroidMike Taylor
 
Write Your iOS App in Swift with a Graph Database
Write Your iOS App in Swift with a Graph DatabaseWrite Your iOS App in Swift with a Graph Database
Write Your iOS App in Swift with a Graph DatabaseAnthony Blatner
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...DicodingEvent
 
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdfInternship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdfVitulChauhan
 
Game-Changing Power of React Native for Businesses in 2024
Game-Changing Power of React Native for Businesses in 2024Game-Changing Power of React Native for Businesses in 2024
Game-Changing Power of React Native for Businesses in 2024Andolasoft Inc
 

Similar a Session 7 - Overview of the iOS7 app development architecture (20)

Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
ios basics
ios basicsios basics
ios basics
 
Password security system for websites
Password security system for websitesPassword security system for websites
Password security system for websites
 
Empower individuals with autism through coding
Empower individuals with autism through codingEmpower individuals with autism through coding
Empower individuals with autism through coding
 
Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)
 
How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?
 
Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1
 
Free advertising platform for businesses with IOS & Android Apps development
Free advertising platform for businesses with IOS & Android Apps developmentFree advertising platform for businesses with IOS & Android Apps development
Free advertising platform for businesses with IOS & Android Apps development
 
Free advertising platform for businesses with IOS & Android Apps development
Free advertising platform for businesses with IOS & Android Apps developmentFree advertising platform for businesses with IOS & Android Apps development
Free advertising platform for businesses with IOS & Android Apps development
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
 
PukaPuka Presentation
PukaPuka PresentationPukaPuka Presentation
PukaPuka Presentation
 
Anshul Mahajan
Anshul MahajanAnshul Mahajan
Anshul Mahajan
 
Community App for Promoting Cross-Cultural Interaction
Community App for Promoting Cross-Cultural InteractionCommunity App for Promoting Cross-Cultural Interaction
Community App for Promoting Cross-Cultural Interaction
 
Community App for Promoting Cross-Cultural Interaction
Community App for Promoting Cross-Cultural InteractionCommunity App for Promoting Cross-Cultural Interaction
Community App for Promoting Cross-Cultural Interaction
 
Loyalty & Rewards Points Application on your mobile, iPhone, Android
Loyalty & Rewards Points Application on your mobile, iPhone, AndroidLoyalty & Rewards Points Application on your mobile, iPhone, Android
Loyalty & Rewards Points Application on your mobile, iPhone, Android
 
Write Your iOS App in Swift with a Graph Database
Write Your iOS App in Swift with a Graph DatabaseWrite Your iOS App in Swift with a Graph Database
Write Your iOS App in Swift with a Graph Database
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
 
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdfInternship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
 
Game-Changing Power of React Native for Businesses in 2024
Game-Changing Power of React Native for Businesses in 2024Game-Changing Power of React Native for Businesses in 2024
Game-Changing Power of React Native for Businesses in 2024
 

Más de Vu Tran Lam

Session 13 - Working with navigation and tab bar
Session 13 - Working with navigation and tab barSession 13 - Working with navigation and tab bar
Session 13 - Working with navigation and tab barVu Tran Lam
 
Session 12 - Overview of taps, multitouch, and gestures
Session 12 - Overview of taps, multitouch, and gestures Session 12 - Overview of taps, multitouch, and gestures
Session 12 - Overview of taps, multitouch, and gestures Vu Tran Lam
 
Session 14 - Working with table view and search bar
Session 14 - Working with table view and search barSession 14 - Working with table view and search bar
Session 14 - Working with table view and search barVu Tran Lam
 
Session 5 - Foundation framework
Session 5 - Foundation frameworkSession 5 - Foundation framework
Session 5 - Foundation frameworkVu Tran Lam
 
Session 4 - Object oriented programming with Objective-C (part 2)
Session 4  - Object oriented programming with Objective-C (part 2)Session 4  - Object oriented programming with Objective-C (part 2)
Session 4 - Object oriented programming with Objective-C (part 2)Vu Tran Lam
 
Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Vu Tran Lam
 
Session 2 - Objective-C basics
Session 2 - Objective-C basicsSession 2 - Objective-C basics
Session 2 - Objective-C basicsVu Tran Lam
 
Session 16 - Designing universal interface which used for iPad and iPhone
Session 16  -  Designing universal interface which used for iPad and iPhoneSession 16  -  Designing universal interface which used for iPad and iPhone
Session 16 - Designing universal interface which used for iPad and iPhoneVu Tran Lam
 
iOS 7 Application Development Course
iOS 7 Application Development CourseiOS 7 Application Development Course
iOS 7 Application Development CourseVu Tran Lam
 
Session 15 - Working with Image, Scroll, Collection, Picker, and Web View
Session 15  - Working with Image, Scroll, Collection, Picker, and Web ViewSession 15  - Working with Image, Scroll, Collection, Picker, and Web View
Session 15 - Working with Image, Scroll, Collection, Picker, and Web ViewVu Tran Lam
 
Session 1 - Introduction to iOS 7 and SDK
Session 1 -  Introduction to iOS 7 and SDKSession 1 -  Introduction to iOS 7 and SDK
Session 1 - Introduction to iOS 7 and SDKVu Tran Lam
 
Succeed in Mobile career
Succeed in Mobile careerSucceed in Mobile career
Succeed in Mobile careerVu Tran Lam
 
Android Application Development Course
Android Application Development Course Android Application Development Course
Android Application Development Course Vu Tran Lam
 
Your Second iPhone App - Code Listings
Your Second iPhone App - Code ListingsYour Second iPhone App - Code Listings
Your Second iPhone App - Code ListingsVu Tran Lam
 
Introduction to MVC in iPhone Development
Introduction to MVC in iPhone DevelopmentIntroduction to MVC in iPhone Development
Introduction to MVC in iPhone DevelopmentVu Tran Lam
 
Building a Completed iPhone App
Building a Completed iPhone AppBuilding a Completed iPhone App
Building a Completed iPhone AppVu Tran Lam
 
Introduction to iPhone Programming
Introduction to iPhone Programming Introduction to iPhone Programming
Introduction to iPhone Programming Vu Tran Lam
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignVu Tran Lam
 
HTML5 Web Standards
HTML5 Web StandardsHTML5 Web Standards
HTML5 Web StandardsVu Tran Lam
 
3D & Animation Effects Using CSS3 & jQuery
3D & Animation Effects Using CSS3 & jQuery3D & Animation Effects Using CSS3 & jQuery
3D & Animation Effects Using CSS3 & jQueryVu Tran Lam
 

Más de Vu Tran Lam (20)

Session 13 - Working with navigation and tab bar
Session 13 - Working with navigation and tab barSession 13 - Working with navigation and tab bar
Session 13 - Working with navigation and tab bar
 
Session 12 - Overview of taps, multitouch, and gestures
Session 12 - Overview of taps, multitouch, and gestures Session 12 - Overview of taps, multitouch, and gestures
Session 12 - Overview of taps, multitouch, and gestures
 
Session 14 - Working with table view and search bar
Session 14 - Working with table view and search barSession 14 - Working with table view and search bar
Session 14 - Working with table view and search bar
 
Session 5 - Foundation framework
Session 5 - Foundation frameworkSession 5 - Foundation framework
Session 5 - Foundation framework
 
Session 4 - Object oriented programming with Objective-C (part 2)
Session 4  - Object oriented programming with Objective-C (part 2)Session 4  - Object oriented programming with Objective-C (part 2)
Session 4 - Object oriented programming with Objective-C (part 2)
 
Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)
 
Session 2 - Objective-C basics
Session 2 - Objective-C basicsSession 2 - Objective-C basics
Session 2 - Objective-C basics
 
Session 16 - Designing universal interface which used for iPad and iPhone
Session 16  -  Designing universal interface which used for iPad and iPhoneSession 16  -  Designing universal interface which used for iPad and iPhone
Session 16 - Designing universal interface which used for iPad and iPhone
 
iOS 7 Application Development Course
iOS 7 Application Development CourseiOS 7 Application Development Course
iOS 7 Application Development Course
 
Session 15 - Working with Image, Scroll, Collection, Picker, and Web View
Session 15  - Working with Image, Scroll, Collection, Picker, and Web ViewSession 15  - Working with Image, Scroll, Collection, Picker, and Web View
Session 15 - Working with Image, Scroll, Collection, Picker, and Web View
 
Session 1 - Introduction to iOS 7 and SDK
Session 1 -  Introduction to iOS 7 and SDKSession 1 -  Introduction to iOS 7 and SDK
Session 1 - Introduction to iOS 7 and SDK
 
Succeed in Mobile career
Succeed in Mobile careerSucceed in Mobile career
Succeed in Mobile career
 
Android Application Development Course
Android Application Development Course Android Application Development Course
Android Application Development Course
 
Your Second iPhone App - Code Listings
Your Second iPhone App - Code ListingsYour Second iPhone App - Code Listings
Your Second iPhone App - Code Listings
 
Introduction to MVC in iPhone Development
Introduction to MVC in iPhone DevelopmentIntroduction to MVC in iPhone Development
Introduction to MVC in iPhone Development
 
Building a Completed iPhone App
Building a Completed iPhone AppBuilding a Completed iPhone App
Building a Completed iPhone App
 
Introduction to iPhone Programming
Introduction to iPhone Programming Introduction to iPhone Programming
Introduction to iPhone Programming
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
HTML5 Web Standards
HTML5 Web StandardsHTML5 Web Standards
HTML5 Web Standards
 
3D & Animation Effects Using CSS3 & jQuery
3D & Animation Effects Using CSS3 & jQuery3D & Animation Effects Using CSS3 & jQuery
3D & Animation Effects Using CSS3 & jQuery
 

Último

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Último (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Session 7 - Overview of the iOS7 app development architecture

  • 2. Overview of the iOS 7 Application Development Architecture These are confidential sessions - please refrain from streaming, blogging, or taking pictures Session 7 Vu Tran Lam IAD-2013
  • 3. Start Developing iOS Apps Today
  • 4. Creating iOS apps is fun and rewarding. If you're a new developer, you might be wondering where to begin. This road map provides the perfect starting point for iOS app development.
  • 5. When you develop apps, you use the iOS software development kit (SDK) and Xcode, Apple’s integrated development environment (IDE).
  • 6. To make a great iOS app, you need to learn and do many things, but the tools and iOS SDK make it easy to get a simple app running. Let’s do the tutorial Your First iOS App.
  • 7. Xcode provides tools to manage your entire development workflow- from creating your app and designing your user interface, to testing, optimizing, and shipping your app to the App Store.
  • 8. Objective-C is an elegant object-oriented language that is used in all iOS apps. You need to understand this language in order to use most iOS application frameworks.
  • 9. If you’ve learned enough about Objective-C to read and write basic code, you can begin to think in terms of objects - OOP. To create an iOS app, you need to know how to create, compare, query objects and access objects in collections such as arrays.
  • 10. iOS app consists of code that you write and frameworks provided by Apple. A framework contains a library of methods that your app can use. More than one app can access a framework library at the same time.
  • 11. A design pattern solves a common software engineering problem. Patterns are abstract designs, not code. When you adopt a design, you adapt the general pattern to your specific needs.
  • 12. Users expect iOS apps to be intuitive, interactive, and engaging. Think about user experience as you design every aspect of your app, from the features you choose to the way your app responds to a gesture.
  • 13. Before you begin writing a line of code, you should make some critical design decisions. Be as specific as possible about your app’s purpose and features. Choose the kind of data model your app will use. Decide on a user interface style for your app.
  • 14. After completing your iOS App, if you want more and more iOS users know and download your app, you must publish your app on the App Store. To make a great app, you need to test it on actual devices, not just in Simulator. To run an app on iOS-based devices, you need to register your devices, create certificates that authorize developers to sign an app, and create an app ID to identify the app.
  • 15. While developing your apps, you’ll need easy access to detailed technical information. Xcode makes that material available at your fingertips while you're coding.
  • 16.
  • 17. • Model-View-Controller • Delegation • Target-Action • Block objects • Sandboxing Fundamental iOS Design Patterns & Techniques
  • 18. Model-View-Controller • By default, iOS apps are organized around the Model-View- Controller design pattern. • The Model-View-Controller (MVC) design pattern assigns objects in an application one of three roles: model, view, or controller. The pattern defines not only the roles objects play in the application, it defines the way objects communicate with each other. • MVC is central to a good design for a Cocoa Touch application. Many objects in these applications tend to be more reusable, and their interfaces tend to be better defined. • Applications having an MVC design are also more easily extensible than other applications.
  • 20. Assign objects in an application to one of three roles. ViewModel Controller Model-View-Controller
  • 21. Model objects encapsulate the data specific to an application and define the logic and computation that manipulate and process that data, e.g: a model object represent a character in game or a contact in address book. Model View Controller Model-View-Controller
  • 22. A view object is an object in an application that users can see. A view object knows how to draw itself and can respond to user actions. Model View Controller Model-View-Controller
  • 23. A controller object acts as an intermediary between view and model objects. In MVC, a controller object interprets user actions made in view objects and communicates new or changed data to the model objects. Model View Controller Model-View-Controller
  • 24. ViewModel Controller It’s all about managing communication between 3 roles types Model-View-Controller
  • 25. ViewModel Controller Controllers can always talk directly to their Model. update Model-View-Controller
  • 26. ViewModel Controller Controllers can also talk directly to their View. outlet update update Model-View-Controller
  • 27. ViewModel The Model and View should never speak to each other. Controller ? outlet update update Model-View-Controller
  • 28. ViewModel Can the View speak to its Controller? Controller ? outlet update update Model-View-Controller
  • 29. ViewModel action target The Controller can drop a target on itself. Controller outlet update update Model-View-Controller
  • 30. ViewModel action target Then hand out an action to the View. Controller outlet update update Model-View-Controller
  • 31. ViewModel action target The View sends the action when things happen in the UI. Controller outlet update update Model-View-Controller
  • 32. ViewModel action target Sometimes the View needs to synchronize with the Controller. should did will Controller update outlet update Model-View-Controller
  • 33. ViewModel action target The Controller sets itself as the View’s delegate. delegate should did will Controller update outlet update Model-View-Controller
  • 34. ViewModel action target The delegate is set via a protocol (i.e. it’s “blind” to class). delegate should did will Controller outlet update update Model-View-Controller
  • 35. ViewModel action target Views do not own the data they display. delegate should did will Controller outlet update update Model-View-Controller
  • 36. ViewModel Model-View-Controller action target So, if needed, they have a protocol to acquire it. delegate should did will data at count Controller outlet update update
  • 37. ViewModel action target Controllers are almost always that data source (not Model!). data source data at count delegate should did will Controller outlet update update Model-View-Controller
  • 38. ViewModel action target Controllers interpret/format Model information for the View. data source data at count delegate should did will Controller outlet update update Model-View-Controller
  • 39. ViewModel action target Can the Model talk directly to the Controller? data source data at count delegate should did will Controller outlet update update ? Model-View-Controller
  • 40. ViewModel So what if the Model has information to update or something? action target data source data at count delegate should did will Controller outlet update update ? Model-View-Controller
  • 41. ViewModel It uses a “radio station”-like broadcast mechanism action target notification data source data at count delegate should did will Controller outlet update update notify Model-View-Controller
  • 42. Controllers (or other Model) “tune in” to interesting stuff. action ViewModel target notification data source data at count delegate should did will Controllernotify outlet update update Model-View-Controller
  • 43. Key Objects in an iOS App
  • 44. Delegation • Delegation is the design pattern which facilitates the transfer information and data from one object to another. In delegation, an object called the delegate acts on behalf of, and at the request of, another object. • A prime example of delegation can be seen in the case of the UIApplication class. The UIApplication class, of which every iOS iPhone application must have one instance, is responsible for the control and operation of the application within the iOS environment. • The Application Delegate is a custom object created at app launch time, usually by the UIApplicationMain function. • The primary job of Application Delegate is to handle state transitions within the app. For example, this object is responsible for launch-time initialization and handling transitions to and from the
  • 45. Managing App State Changes • The app launch cycle • Responding to interruptions • Moving to the background • Returning to the foreground • The main run loop
  • 46. The App Launch Cycle
  • 47. The App Launch Cycle
  • 48.
  • 49. The App Launch Cycle
  • 50. The App Launch Cycle
  • 51.
  • 53. Returning to the Foreground
  • 54. The Main Run Loop The main run loop of your app is responsible for processing all user- related events. The UIApplication object sets up the main run loop at launch time and uses it to process events and handle updates to view- based interfaces.
  • 55. Target-Action • Target-action is a design pattern in which an object holds the information necessary to send a message to another object when an event occurs. • The stored information consists of two items of data: an action selector, which identifies the method to be invoked, and a target, which is the object to receive the message. • The message sent when the event occurs is called an action message.
  • 56. • For example, when a user interacts with a slider (action), it generates a UIControlEventValueChanged control event. You could use this event to update a label’s text to the current value of the slider. In this case, the sender is the slider, the control event is Value Changed, the action is updating the label’s text, and the target is the controller file containing the label as an IBOutlet. • Action methods must have a conventional signature as - (IBAction)doSomething:(id)sender;! • UIKit framework allows three different forms of action selector: - (void)action; - (void)action:(id)sender; - (void)action:(id)sender forEvent:(UIEvent *)event; Target-Action
  • 57. • Target-action is primarily a feature of controls in both the Cocoa Touch and Cocoa frameworks. • A control is a user-interface object such as a button, slider, or switch that users manipulate (by tapping, dragging, and so on) to signal their intention to an app. • A Cocoa Touch control stores both action and target; most Cocoa controls are paired with one or more cell objects that store target and action. Target-Action
  • 58. Block Objects • Block objects are a C-level syntactic and runtime feature that allow you to compose function expressions that can be passed as arguments, optionally stored, and used by multiple threads. • Declaring a block float (^aBlock)(const int*, int, float); • Creating a block int (^oneFrom)(int); oneFrom = ^(int anInt) { return anInt - 1; }; • Using block printf("%dn", oneFrom(10));
  • 59. Sandboxing • All iOS apps are placed in sandboxes to protect the system and other apps. • The structure of the sandbox affects the placement of your app’s files and has implications for data backups and some app-related features.
  • 60. • Concept of View Controller • Visual Interfaces • View Controllers manage Views • Taxonomy of View Controllers • Using Storyboards to design User Interface Overview of View Controllers
  • 61. • View controllers are a vital link between an app’s data and its visual appearance. Whenever an iOS app displays a user interface, the displayed content is managed by a view controller or a group of view controllers coordinating with each other. • View controllers are traditional controller objects in the Model-View- Controller (MVC) design pattern, but they also do much more. View controllers provide many behaviors common to all iOS apps. About View Controllers
  • 62. Visual Interfaces Screens, Windows, and Views create Visual Interfaces.
  • 63. • Each view controller organizes and controls a view • View controllers are controller objects in the MVC pattern, but a view controller also has specific tasks iOS expects it to perform. • These tasks are defined by the UIViewController class that all view controllers inherit from. View Controllers Manage Views
  • 64. • Each view controller organizes and controls a view • View controllers are controller objects in the MVC pattern, but a view controller also has specific tasks iOS expects it to perform. • These tasks are defined by the UIViewController class that all view controllers inherit from. Taxonomy of View Controllers
  • 65. Taxonomy of View Controllers
  • 66. Using Storyboards to Design User Interface
  • 67. Documentation iOS App Programming Guide https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ Introduction/Introduction.html Streamline Your App with Design Patterns https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/chapters/ StreamlineYourAppswithDesignPatterns/StreamlineYourApps/StreamlineYourApps.html Concepts in Objective-C Programming https://developer.apple.com/library/ios/documentation/general/conceptual/CocoaEncyclopedia/Introduction/ Introduction.html View Programming Guide https://developer.apple.com/library/ios/DOCUMENTATION/WindowsViews/Conceptual/ViewPG_iPhoneOS/ Introduction/Introduction.html
  • 69. Next: Xcode 5 & Interface Builder for iOS 7 App