UIViewController Class 参考3 (Testing for Specific Kinds of View Transitions,Configuring the View’s L)

Testing for Specific Kinds of View Transitions


isMovingFromParentViewController

Returns a Boolean value that indicates that the view controller is in the process of being removed from its parent.

返回一个波尔值显示视图控制器从父控制器移除的过程。

- (BOOL)isMovingFromParentViewController
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

详细说明:

这个方法只有在下面这些方法中被调用时,才返回YES:
viewWillDisappear
viewDisappear


isBeingPresented

Returns a Boolean value that indicates whether the view controller is in the process of being presented by one of its ancestors.

- (BOOL)isBeingPresented
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

详细说明:
只有在下面的方法中调用这个方法时才放回YES
viewWillAppear
viewDidAppear

Configuring the View’s Layout Behavior


automaticallyAdjustsScrollViewInsets

Specifies whether or not the view controller should automatically adjust its scroll view insets.

指定是否视图控制器应该自动调整视图inset。

@property(nonatomic, assign) BOOL automaticallyAdjustsScrollViewInsets
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

详细说明:
默认值是YES,这样视图控制器会根据状态栏,导航条,以及工具条或者选项条,来调整scroll的嵌入。

edgesForExtendedLayout

Indicates the extended edges to use for the layout.

显示扩展的边缘来布局。

@property(nonatomic, assign)  UIRectEdge edgesForExtendedLayout
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.

陈列子视图控制器时首选的内容大小。

@property(nonatomic)  CGSize preferredContentSize
Availability
  • Available in iOS 7.0 and later.
Declared In
UIViewController.h

extendedLayoutIncludesOpaqueBars

Indicates whether or not the extended layout includes opaque bars.

是否延伸的布局包括不透明的bar。

@property(nonatomic, assign) BOOL extendedLayoutIncludesOpaqueBars
Discussion

Default value is NO.

默认值是NO

Note: Bars are translucent by default in iOS 7.0

注意:iOS7中Bar是透明或者半透明的

Availability
  • Available in iOS 7.0 and later.
Declared In
UIViewController.h

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值