SlideShare a Scribd company logo
1 of 15
iOS Training
(Intermediate)
Gurpreet Singh
Sriram Viswanathan

Yahoo! Confidential

1
Topics
 Protocols and Delegates
 Categories and Selectors
 Views and View Controllers
 Introduction to View Controllers
 Types of View Controllers

 Hands on example for
 Creating a View Controller
 Manipulating Views
 Adding Content to Application
 Working with Images

 Adding Simple Animation

Yahoo! Confidential

2
Protocols and Delegates
Protocol
 Protocols declare methods that others are expected to implement
 Similar to interfaces in other languages
 Protocol does not require .m file.
 Protocol can have @optional methods
Delegate
 It allows one object to delegate part of its behavior to be handled by
another object.

Yahoo! Confidential

3
Topics
 Protocols and Delegates
 Categories and Selectors
 Views and View Controllers
 Introduction to View Controllers
 Types of View Controllers

 Hands on example for
 Creating a View Controller
 Manipulating Views
 Adding Content to Application
 Working with Images

 Adding Simple Animation

Yahoo! Confidential

4
Categories and Selectors
Categories:
 Lets you add methods to class without having access original code
 Access instance variable but can't add new ones
@implementation NSString (NumericComparison)
- (NSComparisonResult) compareNumerically:(NSString *) compareWithString {
// ADD NUMERIC SORTING LOGIC HERE
}
@end

Selectors:
 Selector is a way of specifying a method to call
@selector(methodName)

Yahoo! Confidential

5
Topics
 Protocols and Delegates
 Categories and Selectors
 Views and View Controllers
 Introduction to View Controllers
 Types of View Controllers

 Hands on example for
 Creating a View Controller
 Manipulating Views
 Adding Content to Application
 Working with Images

 Adding Simple Animation

Yahoo! Confidential

6
Introduction to View Controllers
 Link between application’s data and user interface
 View controllers are traditional controller objects in the MVC design
pattern
 Responsible for fetching/initializing models
 Every view controller that Apple provides extends from the
UIViewController class
 You Manage Your Content Using Content View Controllers
 A content view controller presents content on the screen using a view or a
group of views organized into a view hierarchy.

 Container View Controllers Manage Other View Controllers
 A container view controller contains content owned by other view controllers.

Yahoo! Confidential

7
Introduction to View Controllers

 Every view is controlled by only one view controller.
 Each view controller interacts with a subset of your app’s data.
 For example, the Photo controller needs to know only the photo to be displayed.
Yahoo! Confidential

8
Topics
 Protocols and Delegates
 Categories and Selectors
 Views and View Controllers
 Introduction to View Controllers
 Types of View Controllers

 Hands on example for
 Creating a View Controller
 Manipulating Views
 Adding Content to Application
 Working with Images

 Adding Simple Animation

Yahoo! Confidential

9
Types of View Controllers
Most commonly used UI View Controllers
UINavigationController
 Navigation Controllers Manage Stacks of Other View Controllers

Yahoo! Confidential

10
Types of View Controllers
UITableViewController

Interesting features:
•
•

Lazy loading
Grouping

Yahoo! Confidential

11
Types of View Controllers
UITabBarController
 Tab Bar Controllers Manage Independent Sets of View Controllers

Yahoo! Confidential

12
Types of View Controllers
UIPageViewController
 Page View Controllers Manage Paged Display of View Controllers
 Apps can use a page view controller to present a paged view of content
 The page view controller itself manages the display of one or more
content view controllers, each of which provides a single page of content.
UISplitViewController
 Split View Controllers Manage Two Panes of Information
 Apps can use a split view controller to manage two panes of
information, where both portions of the interface are themselves managed
by view controllers.
 This is interface is similar to a navigation controller, but it takes advantage
of the larger screen size of iPad to present more content at a time.

Yahoo! Confidential

13
Types of View Controllers
View Controllers at a glance

Yahoo! Confidential

14
Topics
 Protocols and Delegates
 Categories and Selectors
 Views and View Controllers
 Introduction to View Controllers
 Types of View Controllers

 Hands on example for
 Creating a View Controller
 Manipulating Views
 Adding Content to Application
 Working with Images

 Adding Simple Animation

Yahoo! Confidential

15

More Related Content

What's hot

MPointInc_AndroidSDK_Documentation
MPointInc_AndroidSDK_DocumentationMPointInc_AndroidSDK_Documentation
MPointInc_AndroidSDK_Documentation
Xin Shao
 
Android 4.0 UI Design Tips
Android 4.0 UI Design TipsAndroid 4.0 UI Design Tips
Android 4.0 UI Design Tips
Justin Lee
 

What's hot (20)

My Very First Zf App Part One
My Very First Zf App   Part OneMy Very First Zf App   Part One
My Very First Zf App Part One
 
Day 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver ComponentDay 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver Component
 
Salesforce.com Lightning
Salesforce.com LightningSalesforce.com Lightning
Salesforce.com Lightning
 
Case study on Movie Quiz App For IPhone and IPad – Facebook Enabled
Case study on Movie Quiz App For IPhone and IPad –  Facebook Enabled Case study on Movie Quiz App For IPhone and IPad –  Facebook Enabled
Case study on Movie Quiz App For IPhone and IPad – Facebook Enabled
 
Icreate
IcreateIcreate
Icreate
 
Kt 15 07-2013
Kt 15 07-2013Kt 15 07-2013
Kt 15 07-2013
 
Canvas and Model Driven Apps
Canvas and Model Driven AppsCanvas and Model Driven Apps
Canvas and Model Driven Apps
 
Mobile testing android
Mobile testing   androidMobile testing   android
Mobile testing android
 
Android application development
Android application developmentAndroid application development
Android application development
 
Node in Production at Aviary
Node in Production at AviaryNode in Production at Aviary
Node in Production at Aviary
 
Social media comm photo sharing project
Social media comm photo sharing projectSocial media comm photo sharing project
Social media comm photo sharing project
 
Android vs iOS
Android vs iOSAndroid vs iOS
Android vs iOS
 
Android project
Android projectAndroid project
Android project
 
View controllerp gforios
View controllerp gforiosView controllerp gforios
View controllerp gforios
 
MPointInc_AndroidSDK_Documentation
MPointInc_AndroidSDK_DocumentationMPointInc_AndroidSDK_Documentation
MPointInc_AndroidSDK_Documentation
 
Android 4.0 UI Design Tips
Android 4.0 UI Design TipsAndroid 4.0 UI Design Tips
Android 4.0 UI Design Tips
 
Web application development process
Web application development processWeb application development process
Web application development process
 
Create your First Watchkit App
Create your First Watchkit AppCreate your First Watchkit App
Create your First Watchkit App
 
Day 1 Android: Before Getting Started
Day 1 Android: Before Getting StartedDay 1 Android: Before Getting Started
Day 1 Android: Before Getting Started
 
Beta testing guidelines for developer
Beta testing guidelines for developerBeta testing guidelines for developer
Beta testing guidelines for developer
 

Similar to iOS training (intermediate)

Refreshing Your App in iOS 7
Refreshing Your App in iOS 7Refreshing Your App in iOS 7
Refreshing Your App in iOS 7
Aviary
 
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdf
AbdullahMunir32
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
Vu Tran Lam
 
VIPER Architecture
VIPER ArchitectureVIPER Architecture
VIPER Architecture
Ahmed Lotfy
 
iPhone Development: Multiple Views
iPhone Development: Multiple ViewsiPhone Development: Multiple Views
iPhone Development: Multiple Views
Jussi Pohjolainen
 

Similar to iOS training (intermediate) (20)

Refreshing Your App in iOS 7
Refreshing Your App in iOS 7Refreshing Your App in iOS 7
Refreshing Your App in iOS 7
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
Notes Unit3.pptx
Notes Unit3.pptxNotes Unit3.pptx
Notes Unit3.pptx
 
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdf
 
Ui 5
Ui   5Ui   5
Ui 5
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 04)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 04)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 04)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 04)
 
MVC 4
MVC 4MVC 4
MVC 4
 
Intro to UIKit • Made by Many
Intro to UIKit • Made by ManyIntro to UIKit • Made by Many
Intro to UIKit • Made by Many
 
Android Study Jam 2
Android Study Jam 2Android Study Jam 2
Android Study Jam 2
 
App Project Planning, by Apple
App Project Planning, by AppleApp Project Planning, by Apple
App Project Planning, by Apple
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
 
VIPER Architecture
VIPER ArchitectureVIPER Architecture
VIPER Architecture
 
iPhone Development: Multiple Views
iPhone Development: Multiple ViewsiPhone Development: Multiple Views
iPhone Development: Multiple Views
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android
 
Top 15 most popular drupal 8 modules
Top 15 most popular drupal 8 modulesTop 15 most popular drupal 8 modules
Top 15 most popular drupal 8 modules
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)
 
Oracle11g form-course-curriculum
Oracle11g form-course-curriculumOracle11g form-course-curriculum
Oracle11g form-course-curriculum
 
Oracle11g form course-curriculum
Oracle11g form course-curriculumOracle11g form course-curriculum
Oracle11g form course-curriculum
 
WPF Line of Business Control Templates Styles
WPF Line of Business Control Templates StylesWPF Line of Business Control Templates Styles
WPF Line of Business Control Templates Styles
 
angularjs_tutorial.docx
angularjs_tutorial.docxangularjs_tutorial.docx
angularjs_tutorial.docx
 

More from Gurpreet Singh Sachdeva (6)

iOS App performance - Things to take care
iOS App performance - Things to take careiOS App performance - Things to take care
iOS App performance - Things to take care
 
Firefox addons
Firefox addonsFirefox addons
Firefox addons
 
Introduction to Greasemonkey
Introduction to GreasemonkeyIntroduction to Greasemonkey
Introduction to Greasemonkey
 
iOS training (advanced)
iOS training (advanced)iOS training (advanced)
iOS training (advanced)
 
iOS training (basic)
iOS training (basic)iOS training (basic)
iOS training (basic)
 
Introduction to Data Warehousing
Introduction to Data WarehousingIntroduction to Data Warehousing
Introduction to Data Warehousing
 

Recently uploaded

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Recently uploaded (20)

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 

iOS training (intermediate)

  • 1. iOS Training (Intermediate) Gurpreet Singh Sriram Viswanathan Yahoo! Confidential 1
  • 2. Topics  Protocols and Delegates  Categories and Selectors  Views and View Controllers  Introduction to View Controllers  Types of View Controllers  Hands on example for  Creating a View Controller  Manipulating Views  Adding Content to Application  Working with Images  Adding Simple Animation Yahoo! Confidential 2
  • 3. Protocols and Delegates Protocol  Protocols declare methods that others are expected to implement  Similar to interfaces in other languages  Protocol does not require .m file.  Protocol can have @optional methods Delegate  It allows one object to delegate part of its behavior to be handled by another object. Yahoo! Confidential 3
  • 4. Topics  Protocols and Delegates  Categories and Selectors  Views and View Controllers  Introduction to View Controllers  Types of View Controllers  Hands on example for  Creating a View Controller  Manipulating Views  Adding Content to Application  Working with Images  Adding Simple Animation Yahoo! Confidential 4
  • 5. Categories and Selectors Categories:  Lets you add methods to class without having access original code  Access instance variable but can't add new ones @implementation NSString (NumericComparison) - (NSComparisonResult) compareNumerically:(NSString *) compareWithString { // ADD NUMERIC SORTING LOGIC HERE } @end Selectors:  Selector is a way of specifying a method to call @selector(methodName) Yahoo! Confidential 5
  • 6. Topics  Protocols and Delegates  Categories and Selectors  Views and View Controllers  Introduction to View Controllers  Types of View Controllers  Hands on example for  Creating a View Controller  Manipulating Views  Adding Content to Application  Working with Images  Adding Simple Animation Yahoo! Confidential 6
  • 7. Introduction to View Controllers  Link between application’s data and user interface  View controllers are traditional controller objects in the MVC design pattern  Responsible for fetching/initializing models  Every view controller that Apple provides extends from the UIViewController class  You Manage Your Content Using Content View Controllers  A content view controller presents content on the screen using a view or a group of views organized into a view hierarchy.  Container View Controllers Manage Other View Controllers  A container view controller contains content owned by other view controllers. Yahoo! Confidential 7
  • 8. Introduction to View Controllers  Every view is controlled by only one view controller.  Each view controller interacts with a subset of your app’s data.  For example, the Photo controller needs to know only the photo to be displayed. Yahoo! Confidential 8
  • 9. Topics  Protocols and Delegates  Categories and Selectors  Views and View Controllers  Introduction to View Controllers  Types of View Controllers  Hands on example for  Creating a View Controller  Manipulating Views  Adding Content to Application  Working with Images  Adding Simple Animation Yahoo! Confidential 9
  • 10. Types of View Controllers Most commonly used UI View Controllers UINavigationController  Navigation Controllers Manage Stacks of Other View Controllers Yahoo! Confidential 10
  • 11. Types of View Controllers UITableViewController Interesting features: • • Lazy loading Grouping Yahoo! Confidential 11
  • 12. Types of View Controllers UITabBarController  Tab Bar Controllers Manage Independent Sets of View Controllers Yahoo! Confidential 12
  • 13. Types of View Controllers UIPageViewController  Page View Controllers Manage Paged Display of View Controllers  Apps can use a page view controller to present a paged view of content  The page view controller itself manages the display of one or more content view controllers, each of which provides a single page of content. UISplitViewController  Split View Controllers Manage Two Panes of Information  Apps can use a split view controller to manage two panes of information, where both portions of the interface are themselves managed by view controllers.  This is interface is similar to a navigation controller, but it takes advantage of the larger screen size of iPad to present more content at a time. Yahoo! Confidential 13
  • 14. Types of View Controllers View Controllers at a glance Yahoo! Confidential 14
  • 15. Topics  Protocols and Delegates  Categories and Selectors  Views and View Controllers  Introduction to View Controllers  Types of View Controllers  Hands on example for  Creating a View Controller  Manipulating Views  Adding Content to Application  Working with Images  Adding Simple Animation Yahoo! Confidential 15