0% found this document useful (0 votes)
9 views

iOS Overview

The document provides an overview of the iOS environment, including: 1. iOS is the operating system used on Apple mobile devices like iPhone and iPad. It manages hardware and provides technologies for building native apps using languages like Objective-C and Swift. 2. The iOS SDK contains the tools needed to develop apps, including frameworks for manipulating interfaces and a developer's library. Apps are built using a layered architecture with frameworks like UIKit and Foundation. 3. An iOS app uses views, controllers and models. Views display content, controllers handle events and flow. Models represent app data. Navigation controllers manage transitions between scenes using segues.

Uploaded by

Mael MD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

iOS Overview

The document provides an overview of the iOS environment, including: 1. iOS is the operating system used on Apple mobile devices like iPhone and iPad. It manages hardware and provides technologies for building native apps using languages like Objective-C and Swift. 2. The iOS SDK contains the tools needed to develop apps, including frameworks for manipulating interfaces and a developer's library. Apps are built using a layered architecture with frameworks like UIKit and Foundation. 3. An iOS app uses views, controllers and models. Views display content, controllers handle events and flow. Models represent app data. Navigation controllers manage transitions between scenes using segues.

Uploaded by

Mael MD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

iOS Overview

Outline
• 1. Development Environment for iOS
• 2. Architecture of the iOS Environment
• 3. Architecture of an iOS Application
• 4. Application Life Cycle
iOS
Development Environment for iOS

• Operating system present on iPhone, iPad and iPod touch devices


• Manages device hardware and provides necessary technologies to
implement native applications
• Comes with a set of apps
Phone, Mail, Safari…
• Provides standard system services for the user
iOS SDK
Development Environment for iOS

• Contains the tools and interfaces necessary to develop, install, run


and test native applications created for an iOS device
• Native apps are built using
iOS frameworks
A programming language (Objective-C, and more recently Swift)
An Apple development environment
 MacOSX: OS Apple
 Xcode: Apple’s IDE
In a few words, iOS...
Development Environment for iOS

• Uses layered architecture


• Offers frameworks for manipulating system interfaces
• Offers developer's library
Layered architecture
iOS Architecture
Layered architecture
iOS Architecture

Core OS (OS X Kernel) Core Services


 TCP/IP  Networking
 Sockets  SQLite (Database)
 Power Management  Core Location
 File System  Threads
 Security  Address Book
 FileAccess
Layered architecture
iOS Architecture

Media
 OpenAL (OpenAudio Library)
 Quartz / Core Graphics
 CoreAnimation
 Open GL
Layered architecture
iOS Architecture

Cocoa is the API provided by Apple for Mac OS X application


development.

CocoaTouch is the API based on Cocoa, allowing the


development of mobile applications for:
 iPhone
 iPad
 iPod Touch…
Layered architecture
iOS Architecture

CocoaTouch CocoaTouch
 UIKit (UI*)  Foundation (NS*)
 UI Controls  Utility & Collection classes
 Event Handling
 Hardware APIs
 Accelerometer
 Camera
Layered architecture
iOS Architecture

 UIKit Framework
Use when implementing graphical element.
Press a button, resize an image, etc…)
The main elements:
Views, Controls, Controllers-Usually all that is visible is a view (UIView)
The user interface (UI) is managed by view controllers (UIViewController)
Layered architecture
iOS Architecture

 Foundation Framework
Extremely frequent use of these no-user-interface classes (no UI classes)
Press a button, resize an image, etc…)
 Examples:
 Collections :
 NSArray, NSMutableArray, NSDictionary, NSMutableDictionary…
 Values (Wrappers) :
 NSNumber, NSInteger, NSValue, NSString…
 Networking :
 NSURL, NSURLRequest…
View
Architecture of an Application
• Allows the user to interact with the application in a simple way
• Scene: Application screen
• Use of storyboards for the design and implementation of the
interface in a graphical environment
Controllers
Architecture of an Application
• iOS is based on event-driven programming
- The flow of the application is determined by events:
- System Events- User Events
- The response of the application to a user action is reflected
by the interface

• Event handling logic is defined in the


ViewController
- A ViewController for each ContentView
(Scene)
Controllers : Roles
Architecture of an Application
• Coordination of the flow of information between the model and
the views
• ContentView lifecycle management
• Management of device orientation changes
• Response to user interactions
• To connect between storyboard and code, they use:
 Action
 Outlets
 Controls
 Navigation Controllers
 Segues (Sequences)
Action
Architecture of an Application
-Action:
• A code linked to an event that can occur in your application
• When the event occurs, the code is executed
-An action can:
• Manipulate data
• Modify the user interface
• Trigger a treatment
- To define an action, you must create a method with a return
type IBAction and a sender parameter
• Sender: represents the object responsible for triggering the action
• IBAction: special keyword, indicating that the method is an action,
called from an element of the Interface Builder (IB)
Outlets and Controls
Architecture of an Application
- Outlet
• References the objects of an interface from the source code
• Create a property representing this object in the target ViewController file
• The property is of type IBOutlet
• Keyword indicating that this property is connected to an element of
the Interface Builder
-Control
• Graphic object with which a user can interact
• button, slider, switch
• Creation of a control event when a user interacts with a control, belonging to
one of these categories:
• drag and drop
• Editing
• Change in value
Navigation Controllers
Architecture of an Application
• Special View Controller, allowing you to manage the transitions between
the different Scenes of your application
• Will create a stack (LIFO) of the different ViewControllers it navigates
between, called: Navigation Stack
• The first element of the stack (scene that triggered the navigation), is called Root
View Controller (it is never removed from the stack)
• Other View Controllers can be added or removed from the stack, depending on the
user's navigation
• A Navigation controller also presents its own content, in particular the
Navigation Bar
• View at the top of the scene, providing navigation context
• Shows the location of the user in the navigation stack
• Defines a default Back button, allowing to return to the last item in the stack
• May contain other buttons, to be configured as you wish
Segue
Architecture of an Application
• A Segue (or sequence) represents a transition between two
ViewControllers: the source and the destination
Segue
Architecture of an Application
• Several types of Segues:
• Show
• Calls for new content to stack, on top of the current VC
• Show Detail
• Either stacks new content or replaces the current VC in the stack
(depending on the layout used)
• Present Modally
• Calls a child view, which hides the current view, to allow the user to
perform a particular action
• Unwind
• Navigates to a previous view in the stack, not necessarily
• Custom
• Creates a custom transition
Model
Architecture of an Application

• Represents a data structure and (optionally) business logic for the


consistency of this data
• Use of the Framework Foundation to represent the types handled by the
application
• Two categories of data types
• Value Classes: basic types (NSString, NSNumber, NSDate…)
• Classes collection: compound types (NSArray, NSSet and NSDictionary)
Application Execution States
Application Life Cycle
Application Execution States
Application Life Cycle

You might also like