Testing for Specific Kinds of View Transitions
– isMovingFromParentViewController
– isMovingToParentViewController
– isBeingPresented
– isBeingDismissed
isMovingFromParentViewController
Returns a Boolean value that indicates that the view controller is in the process of being removed from its parent.
返回一个波尔值显示视图控制器从父控制器移除的过程。
Return Value
YES
if the view controller is disappearing because it was removed from a container view controller, otherwise NO
.
如果视图控制器正在消失,那么返回YES。
Discussion
This method returns YES
only when called from inside the following methods:
Availability
- Available in iOS 5.0 and later.
Declared In
UIViewController
isBeingPresented
Returns a Boolean value that indicates whether the view controller is in the process of being presented by one of its ancestors.
Return Value
YES
if the view controller is appearing because it was presented by another view controller, otherwise NO
.
如果它由于被其他视图控制器呈现而将要显示,那么返回YES。
Discussion
This method returns YES
only when called from inside the following methods:
Availability
- Available in iOS 5.0 and later.
Declared In
UIViewController.h
Configuring the View’s Layout Behavior
– updateViewConstraints
-
automaticallyAdjustsScrollViewInsets
property -
bottomLayoutGuide
property -
topLayoutGuide
property -
edgesForExtendedLayout
property -
preferredContentSize
property -
extendedLayoutIncludesOpaqueBars
property – childViewControllerForStatusBarHidden
– childViewControllerForStatusBarStyle
– preferredStatusBarStyle
– prefersStatusBarHidden
-
modalPresentationCapturesStatusBarAppearance
property – preferredStatusBarUpdateAnimation
– setNeedsStatusBarAppearanceUpdate
-
wantsFullScreenLayout
property Deprecated in iOS 7.0
automaticallyAdjustsScrollViewInsets
Specifies whether or not the view controller should automatically adjust its scroll view insets.
指定是否视图控制器应该自动调整视图inset。
Discussion
Default value is YES
, which allows the view controller to adjust its scroll view insets in response to the screen areas
consumed by the status bar, navigation bar, and toolbar or tab bar. Set to NO
if you want to manage scroll view inset adjustments yourself,
such as when there is more than one scroll view in the view hierarchy.
Availability
- Available in iOS 7.0 and later.
Declared In
UIViewController.h
edgesForExtendedLayout
Indicates the extended edges to use for the layout.
显示扩展的边缘来布局。
Discussion
Default value is UIRectEdgeAll
.
Availability
- Available in iOS 7.0 and later.
Declared In
UIViewController.h
preferredContentSize
The preferred content size for any container view that is laying out a child view controller.
陈列子视图控制器时首选的内容大小。
Availability
- Available in iOS 7.0 and later.
Declared In
UIViewController.h
extendedLayoutIncludesOpaqueBars
Indicates whether or not the extended layout includes opaque bars.
是否延伸的布局包括不透明的bar。
Discussion
Default value is NO
.
默认值是NO
Availability
- Available in iOS 7.0 and later.
Declared In
UIViewController.h