Successfully reported this slideshow.

Objective c design pattens-architetcure

1,366 views

Published on

Basic Information

Published in: Education
  • Be the first to comment

Objective c design pattens-architetcure

  1. 1. iOS development basic knowledge戴谷州 KEN_TAI@UUU.COM.TW
  2. 2. AGENDA MVC Delegation Target-Action UIApplication Archtecture UIViewController Catelog UIView Archtecture
  3. 3. MVC Model View Controller
  4. 4. MVC Model  Data class/ Entity  Data Access/Business logic View  Display component Controller  View behavior definition  View arrangement
  5. 5. UIKIT ARCHTECTURE Model view UIView UIViewController
  6. 6. UIKIT ARCHTECTURE Model  Custom UIView  Subclass of UIView  .xib / .storyboard UIViewController  View behavior definition  View arrangement (Hard coding)
  7. 7. DELEGATION delegate Component Behavior Component’s behavior is defined in another pre-defined class. Must keep relationship between component and behavior with field relation.
  8. 8. UIKIT DELEGATE delegate UITextField UITextFieldDelegate delegate UITableViewDelegat UITableView e dataSource UITableView DataSource
  9. 9. TARGET-ACTION Target Component CustomClass Action CustomMethod Component’s behavior is defined in custom method in custom class. Must keep relationship between component and behavior with add target and action.
  10. 10. UIKIT TARGET-ACTION Target UIButton self Action clickHandler:
  11. 11. UIAPPLICATION ARCHTECTURE UIApplicatio UIViewController n rootViewControll er view addSubVie w UIApplicationDelegate UIWindow UIView
  12. 12. UIVIEWCONTROLLER CATALOG Container  UINavigationController  UITabBarController  UISplitViewController(iPad)  UIPopoverController(iPad)  UIPageViewController Build-In  UITableViewController  UIMenuController  UIImagePickerController Custom  Subclass of UIViewController ModalViewController  Switch UIViewController
  13. 13. UIVIEW ARCHTECTURE All subclasses of UIView
  14. 14. UIAPPLICATION INTERACTS WITH … Http UIKit Other Services Communication Camera GPS Heading File I/O Media Accelerometer Localization [ [UIApplication shareApploication] openURL] Other App

×