UICollectionViewController
2019-06-13 本文已影响0人
zhYx_
#if USE_UIKIT_PUBLIC_HEADERS || !__has_include(<UIKitCore/UICollectionViewController.h>)
//
// UICollectionViewController.h
// UIKit
//
// Copyright (c) 2011-2018 Apple Inc. All rights reserved.
//
#import <UIKit/UIViewController.h>
#import <UIKit/UICollectionView.h>
#import <UIKit/UIKitDefines.h>
NS_ASSUME_NONNULL_BEGIN
@class UICollectionViewLayout;
@class UICollectionViewController;
#pragma mark - 集合视图控制器 Class
#pragma mark -
NS_CLASS_AVAILABLE_IOS(6_0) @interface UICollectionViewController : UIViewController <UICollectionViewDelegate, UICollectionViewDataSource>
/* 实例化 */
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
/// 集合视图
@property (null_resettable, nonatomic, strong) __kindof UICollectionView *collectionView;
/// 视图将要显示时清除选择(如果useLayoutToLayoutNavigationTransitions设置为YES,此属性无效;默认:YES)
@property (nonatomic) BOOL clearsSelectionOnViewWillAppear;
/// 设置 UICollectionViewController 是否与 UINavigationController 协调以进行过渡(在将UICollectionViewController推送到UINavigationController之前设置为YES; 导航控制器的顶视图控制器必须是UICollectionViewController,该属性设置为NO时将其推送;不应在已经推送到UINavigationController的UICollectionViewController上更改此属性)
@property (nonatomic, assign) BOOL useLayoutToLayoutNavigationTransitions NS_AVAILABLE_IOS(7_0);
/// 布局(初始化时设置的布局)
@property (nonatomic, readonly) UICollectionViewLayout *collectionViewLayout NS_AVAILABLE_IOS(7_0);
/// 是否可排序(如果是,则使用系统标准重新排序手势来驱动集合视图重新排序;默认:YES)
@property (nonatomic) BOOL installsStandardGestureForInteractiveMovement NS_AVAILABLE_IOS(9_0);
@end
NS_ASSUME_NONNULL_END
#else
#import <UIKitCore/UICollectionViewController.h>
#endif