SlideShare una empresa de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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 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 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 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
 

Más 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

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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Último (20)

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
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
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
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
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
 
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
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
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
 
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"
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

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