最終更新:2017-06-06 (火) 18:35:14 (2509d)
UIViewController
Top / UIViewController
すべてのView Controllerオブジェクトの基底クラス
- ビューのロードと表示、(デバイスの回転に応じた)表示の回転など、システムの標準的な動作が実装されている
なんぞや
- View Controllerの基本クラスは、一連のビューをプログラムの中で作成したり、NIBファイルからロードしたりするためのワークフローを提供しています。また、オペレーティングシステムと連携して、メモリ不足状態の間は、これらのビューをメモリから削除し、後で必要になったときに再構築する処理も行います。
- View Controllerは、ユーザがデバイスを回転したときにインターフェイスの向きを変更する動作や、現在のコンテンツの手前にほかのビューを一時的に表示する動作など、標準的なシステム動作のいくつかを自動的にサポートします。
メソッドとか
Creating a View Controller Using Nib Files
- UIViewController initWithNibName:bundle - ObjC
- UIViewController nibName - プロパティ (NSString)
- UIViewController nibBundle? - プロパティ (NSBundle)
Using a Storyboard
- UIViewController shouldPerformSegueWithIdentifier:sender?
- UIViewController performSegueWithIdentifier:sender?
- UIViewController prepareForSegue:sender?
- UIViewController storyboard? - プロパティ (UIStoryboard)
- UIViewController canPerformUnwindSegueAction:fromViewController:withSender?
Managing the View
- UIViewController view? - プロパティ (UIView)
- UIViewController isViewLoaded?
- UIViewController loadView - ビューのロードにNIBを使わない場合にオーバーライドする。
- UIViewController viewDidLoad
- UIViewController title? - プロパティ (NSString)
- UIViewController viewDidUnload? - Deprecated in iOS 6.0
- UIViewController viewWillUnload? - Deprecated in iOS 6.0
Handling Memory Warnings
- UIViewController.didReceiveMemoryWarning?
Responding to View Events
- UIViewController viewWillAppear?
- UIViewController viewDidAppear?
- UIViewController viewWillDisappear?
- UIViewController viewDidDisappear?
- UIViewController viewWillLayoutSubviews?
- UIViewController viewDidLayoutSubviews?
Testing for Specific Kinds of View Transitions
- UIViewController isMovingFromParentViewController?
- UIViewController isMovingToParentViewController?
- UIViewController isBeingPresented?
- UIViewController isBeingDismissed?
Configuring the View’s Layout Behavior
Configuring the View Rotation Settings
- UIViewController shouldAutorotate
- UIViewController supportedInterfaceOrientations
- UIViewController preferredInterfaceOrientationForPresentation?
- UIViewController interfaceOrientation? - プロパティ (UIInterfaceOrientation)
- + UIViewController attemptRotationToDeviceOrientation?
- UIViewController rotatingHeaderView?
- UIViewController rotatingFooterView?
- UIViewController shouldAutorotateToInterfaceOrientation - Deprecated in iOS 6.0
Responding to View Rotation Events
- UIViewController willRotateToInterfaceOrientation:duration?
- UIViewController willAnimateRotationToInterfaceOrientation:duration?
- UIViewController didRotateFromInterfaceOrientation?
- UIViewController didAnimateFirstHalfOfRotationToInterfaceOrientation? - Deprecated in iOS 5.0
- UIViewController willAnimateFirstHalfOfRotationToInterfaceOrientation:duration? - Deprecated in iOS 5.0
- UIViewController willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration? - Deprecated in iOS 5.0
Responding to Containment Events
Adding Editing Behaviors to Your View Controller
Managing State Restoration
- UIViewController restorationIdentifier? - プロパティ (NSString)
- UIViewController restorationClass? - property
- UIViewController encodeRestorableStateWithCoder?
- UIViewController decodeRestorableStateWithCoder?
Presenting Another View Controller’s Content
- UIViewController presentViewController:animated:completion
- UIViewController dismissViewControllerAnimated:completion?
- UIViewController modalTransitionStyle? - プロパティ (UIModalTransitionStyle?)
- UIViewController modalPresentationStyle? - プロパティ (UIModalPresentationStyle?)
- UIViewController definesPresentationContext? - property
- UIViewController providesPresentationContextTransitionStyle? - プロパティ (BOOL)
- UIViewController disablesAutomaticKeyboardDismissal?
- UIViewController dismissModalViewControllerAnimated? - Deprecated in iOS 6.0
- UIViewController presentModalViewController:animated? - Deprecated in iOS 6.0
Getting Other Related View Controllers
- UIViewController presentingViewController - プロパティ (UIViewController)
- UIViewController presentedViewController - プロパティ (UIViewController)
- UIViewController parentViewController? - プロパティ (UIViewController)
- UIViewController navigationController? - プロパティ (UINavigationController)
- UIViewController splitViewController? - プロパティ (UISplitViewController)
- UIViewController tabBarController? - プロパティ (UITabBarController)
- UIViewController searchDisplayController? - プロパティ (UISearchDisplayController?)
- UIViewController modalViewController? - プロパティ (UIViewController) - Deprecated in iOS 6.0
Managing Child View Controllers in a Custom Container
- UIViewController childViewControllers? - プロパティ (NSArray)
- UIViewController addChildViewController?
- UIViewController removeFromParentViewController?
- UIViewController shouldAutomaticallyForwardRotationMethods?
- UIViewController shouldAutomaticallyForwardAppearanceMethods?
- UIViewController transitionFromViewController:toViewController:duration:options:animations:completion?
- UIViewController beginAppearanceTransition:animated?
- UIViewController endAppearanceTransition?
- UIViewController viewControllerForUnwindSegueAction:fromViewController:withSender?
- UIViewController segueForUnwindingToViewController:fromViewController:identifier?
- UIViewController automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers? - Deprecated in iOS 6.0
Configuring a Navigation Interface
- UIViewController navigationItem? - プロパティ (UINavigationItem)
- UIViewController editButtonItem?
- UIViewController hidesBottomBarWhenPushed? - プロパティ (BOOL)
- UIViewController setToolbarItems:animated?
- UIViewController toolbarItems? - プロパティ (NSArray)
Configuring Tab Bar Items
Configuring Display in a Popover Controller
- UIViewController contentSizeForViewInPopover? - プロパティ (CGSize)
- UIViewController modalInPopover? - プロパティ (BOOL)
サブクラス
- UINavigationController
- UIImagePickerController
- UIVideoEditorController?
- UIReferenceLibraryViewController?
- UIPageViewController
- UISplitViewController
- UITabBarController
- UITableViewController
Objective-C/起動プロセス
- UIViewController initWithNibName?
- UIViewController viewDidLoad - ビューのロードが終わった時
- UIViewController viewWillAppear? - 画面の表示される直前
- UIViewController viewWillLayoutSubviews?
- UIViewController viewDidLayoutSubviews?
- viewDidAppear? - 画面の表示が行われた直後