0
iOS Training
(Intermediate)
Gurpreet Singh
Sriram Viswanathan

Yahoo! Confidential

1
Topics
 Protocols and Delegates
 Categories and Selectors
 Views and View Controllers
 Introduction to View Controller...
Protocols and Delegates
Protocol
 Protocols declare methods that others are expected to implement
 Similar to interfaces...
Topics
 Protocols and Delegates
 Categories and Selectors
 Views and View Controllers
 Introduction to View Controller...
Categories and Selectors
Categories:
 Lets you add methods to class without having access original code
 Access instance...
Topics
 Protocols and Delegates
 Categories and Selectors
 Views and View Controllers
 Introduction to View Controller...
Introduction to View Controllers
 Link between application’s data and user interface
 View controllers are traditional c...
Introduction to View Controllers

 Every view is controlled by only one view controller.
 Each view controller interacts...
Topics
 Protocols and Delegates
 Categories and Selectors
 Views and View Controllers
 Introduction to View Controller...
Types of View Controllers
Most commonly used UI View Controllers
UINavigationController
 Navigation Controllers Manage St...
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! Con...
Types of View Controllers
UIPageViewController
 Page View Controllers Manage Paged Display of View Controllers
 Apps can...
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 Controller...
Upcoming SlideShare
Loading in...5
×

iOS training (intermediate)

143

Published on

Published in: Education, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
143
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "iOS training (intermediate)"

  1. 1. iOS Training (Intermediate) Gurpreet Singh Sriram Viswanathan Yahoo! Confidential 1
  2. 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. 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. 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. 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. 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. 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. 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. 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. 10. Types of View Controllers Most commonly used UI View Controllers UINavigationController  Navigation Controllers Manage Stacks of Other View Controllers Yahoo! Confidential 10
  11. 11. Types of View Controllers UITableViewController Interesting features: • • Lazy loading Grouping Yahoo! Confidential 11
  12. 12. Types of View Controllers UITabBarController  Tab Bar Controllers Manage Independent Sets of View Controllers Yahoo! Confidential 12
  13. 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. 14. Types of View Controllers View Controllers at a glance Yahoo! Confidential 14
  15. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×