Henehefu 用 ウィキ

メニュー



- Views

最近の更新

取得中です。

iOS > リファレンス > NSObject > UIResponder > UIViewController


※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

Nib ファイルを使ってView Controller を作成する

- initWithNibName: bundle: bundle で指定された nib ファイルで、新しく初期化された view controller を返す。
nibName プロパティ receiver のnib ファイルの名前が定義済みの場合、それを返す。(read only)
nibBundle プロパティ receiver のnib bundle 名が存在している場合、それを返す。(read only)

View を管理する

view The view that the controller manages.
– loadView Creates the view that the controller manages.
– viewDidLoad Called after the controller’s view is loaded into memory.
– viewDidUnload Called when the controller’s view is released from memory.
– isViewLoaded Returns a Boolean value indicating whether the view is currently loaded into memory.
title A localized string that represents the view that this controller manages.
contentSizeForViewInPopover The size of the view controller’s view while displayed in a popover.
modalInPopover A Boolean value indicating whether the view controller should be presented modally by a popover.

View イベントに応答する

– viewWillAppear: Notifies the view controller that its view is about to be become visible.
– viewDidAppear: Notifies the view controller that its view was added to a window.
– viewWillDisappear: Notifies the view controller that its view is about to be dismissed, covered, or otherwise hidden from view.
– viewDidDisappear: Notifies the view controller that its view was dismissed, covered, or otherwise hidden from view.

Configuring the View’s Layout Behavior

wantsFullScreenLayout プロパティ A Boolean value indicating whether the view should overlap the status bar.

Configuring the View Rotation Settings

interfaceOrientation プロパティ The current orientation of the interface. (read-only)
– shouldAutorotateToInterfaceOrientation: Returns a Boolean value indicating whether the view controller supports the specified orientation.
– rotatingHeaderView Returns the header view to transition during an interface orientation change.
– rotatingFooterView Returns the footer view to transition during an interface orientation change.

View Rotation イベントに応答する

– willRotateToInterfaceOrientation:duration: Sent to the view controller just before the user interface begins rotating.
– willAnimateRotationToInterfaceOrientation:duration: Sent to the view controller before performing a one-step user interface rotation.
– didRotateFromInterfaceOrientation: Sent to the view controller after the user interface rotates.
– willAnimateFirstHalfOfRotationToInterfaceOrientation:duration: Sent to the view controller before performing the first half of a user interface rotation.
– didAnimateFirstHalfOfRotationToInterfaceOrientation: Sent to the view controller after the completion of the first half of the user interface rotation.
– willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration: Sent to the view controller before the second half of the user interface rotates.

メモリの警告を処理する

– didReceiveMemoryWarning Sent to the view controller when the application receives a memory warning.

他の関連するView Controller をGet だぜ

parentViewController プロパティ The parent of the current view controller. (read-only)
searchDisplayController プロパティ The search display controller associated with the view controller. (read-only)
splitViewController プロパティ The parent or ancestor that is a split view controller. (read-only)
modalViewController プロパティ The controller for the active modal view—that is, the view that is temporarily displayed on top of the view managed by the receiver. (read-only)
navigationController プロパティ A parent or ancestor that is a navigation controller. (read-only)
tabBarController プロパティ A parent or ancestor that is a tab bar controller. (read-only)

Presenting Modal Views

– presentModalViewController:animated: Presents a modal view managed by the given view controller to the user.
– dismissModalViewControllerAnimated: Dismisses the modal view controller that was presented by the receiver.
modalTransitionStyle プロパティ The transition style to use when presenting the current view controller modally.
modalPresentationStyle プロパティ The presentation style for modally presented view controllers.

Configuring a Navigation Interface

navigationItem プロパティ The navigation item used to represent the view controller. (read-only)
editing プロパティ A Boolean value indicating whether the view controller currently allows the user to edit the view contents.
– setEditing: animated: Sets whether the view controller shows an editable view.
– editButtonItem Returns a bar button item that toggles its title and associated state between Edit and Done.
hidesBottomBarWhenPushed プロパティ A Boolean value indicating whether the bar at the bottom of the screen is hidden when the view controller is pushed on to a navigation controller.

Configuring the Navigation Controller’s Toolbar

– setToolbarItems: animated: Sets the toolbar items to be displayed along with the view controller.
toolbarItems プロパティ The toolbar items associated with the view controller.

Configuring Tab Bar Items

tabBarItem プロパティ The tab bar item that represents the view controller when added to a tab bar controller.

タグ一覧