UIViewController学习笔记

About View Controllers

        在iOS程序里,view controllers在程序的数据和可视化界面之间提供了一个必不可少的链接.理解when和how去使用view controllers在 iOS程序设计中是非常重要的. 在MVC程序设计中,view controllers是传统的对象控制器,但是view controllers所发挥的作用要更大. 在iOS程序中,view controllers提供了许多管理基础应用行为所需的逻辑. 比如, view controllers管理在屏幕上显示和移除显示内容,管理views的再定位 响应设备中再定位的改变.


概括










Tasks

Creating a View Controller Using Nib Files

  • – initWithNibName:bundle:
  •   nibName  property
  •   nibBundle  property

Managing the View

  •   view  property
  • – loadView
  • – viewDidLoad
  • – viewDidUnload
  • – isViewLoaded
  •   title  property
  •   contentSizeForViewInPopover  property
  •   modalInPopover  property

Responding to View Events

  • – viewWillAppear:
  • – viewDidAppear:
  • – viewWillDisappear:
  • – viewDidDisappear:

Configuring the View’s Layout Behavior

  •   wantsFullScreenLayout  property

Configuring the View Rotation Settings

  •   interfaceOrientation  property
  • – shouldAutorotateToInterfaceOrientation:
  • – rotatingHeaderView
  • – rotatingFooterView

Responding to View Rotation Events

  • – willRotateToInterfaceOrientation:duration:
  • – willAnimateRotationToInterfaceOrientation:duration:
  • – didRotateFromInterfaceOrientation:
  • – willAnimateFirstHalfOfRotationToInterfaceOrientation:duration:
  • – didAnimateFirstHalfOfRotationToInterfaceOrientation:
  • – willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration:

Handling Memory Warnings

  • – didReceiveMemoryWarning

Getting Other Related View Controllers

  •   parentViewController  property
  •   searchDisplayController  property
  •   splitViewController  property
  •   modalViewController  property
  •   navigationController  property
  •   tabBarController  property

Presenting Modal Views

  • – presentModalViewController:animated:
  • – dismissModalViewControllerAnimated:
  •   modalTransitionStyle  property
  •   modalPresentationStyle  property
  • – disablesAutomaticKeyboardDismissal

Configuring a Navigation Interface

  •   navigationItem  property
  •   editing  property
  • – setEditing:animated:
  • – editButtonItem
  •   hidesBottomBarWhenPushed  property

Configuring the Navigation Controller’s Toolbar

  • – setToolbarItems:animated:
  •   toolbarItems  property

Configuring Tab Bar Items

  •   tabBarItem  property





你可能感兴趣的:(ios,mvc,layout,events,Warnings)