SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Kürzlich hochgeladen

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.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
 

Kürzlich hochgeladen (20)

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
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.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
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
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
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.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