SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

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 Oneisaaczfoster
 
Day 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver ComponentDay 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver ComponentAhsanul Karim
 
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 Grey Matter India Technologies PVT LTD
 
Node in Production at Aviary
Node in Production at AviaryNode in Production at Aviary
Node in Production at AviaryAviary
 
Social media comm photo sharing project
Social media comm photo sharing projectSocial media comm photo sharing project
Social media comm photo sharing projectEmilyHart4
 
View controllerp gforios
View controllerp gforiosView controllerp gforios
View controllerp gforiosNgười Sói
 
MPointInc_AndroidSDK_Documentation
MPointInc_AndroidSDK_DocumentationMPointInc_AndroidSDK_Documentation
MPointInc_AndroidSDK_DocumentationXin Shao
 
Android 4.0 UI Design Tips
Android 4.0 UI Design TipsAndroid 4.0 UI Design Tips
Android 4.0 UI Design TipsJustin Lee
 
Web application development process
Web application development processWeb application development process
Web application development processJohn Smith
 
Create your First Watchkit App
Create your First Watchkit AppCreate your First Watchkit App
Create your First Watchkit AppPawan Ramteke
 
Day 1 Android: Before Getting Started
Day 1 Android: Before Getting StartedDay 1 Android: Before Getting Started
Day 1 Android: Before Getting StartedAhsanul Karim
 
Beta testing guidelines for developer
Beta testing guidelines for developerBeta testing guidelines for developer
Beta testing guidelines for developerKetan Raval
 

Mais procurados (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
 

Semelhante a 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 7Aviary
 
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.pdfAbdullahMunir32
 
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)Jonathan Engelsma
 
Intro to UIKit • Made by Many
Intro to UIKit • Made by ManyIntro to UIKit • Made by Many
Intro to UIKit • Made by Manykenatmxm
 
Android Study Jam 2
Android Study Jam 2Android Study Jam 2
Android Study Jam 2DSC GVP
 
App Project Planning, by Apple
App Project Planning, by AppleApp Project Planning, by Apple
App Project Planning, by AppleFranco Cedillo
 
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 applicationVu Tran Lam
 
VIPER Architecture
VIPER ArchitectureVIPER Architecture
VIPER ArchitectureAhmed Lotfy
 
iPhone Development: Multiple Views
iPhone Development: Multiple ViewsiPhone Development: Multiple Views
iPhone Development: Multiple ViewsJussi Pohjolainen
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Androidrizki adam kurniawan
 
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 modulesInnoraft
 
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)Jonathan Engelsma
 
Oracle11g form-course-curriculum
Oracle11g form-course-curriculumOracle11g form-course-curriculum
Oracle11g form-course-curriculumAmit Sharma
 
Oracle11g form course-curriculum
Oracle11g form course-curriculumOracle11g form course-curriculum
Oracle11g form course-curriculumAmit Sharma
 
angularjs_tutorial.docx
angularjs_tutorial.docxangularjs_tutorial.docx
angularjs_tutorial.docxtelegramvip
 

Semelhante a 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
 

Mais de Gurpreet Singh Sachdeva

Mais de 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
 

Último

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
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 ConsultingTechSoup
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Último (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
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"
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

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