#import <UIKit/UIView.h>
#import <UIKit/UIKitDefines.h>
#import <UIKit/UICollectionView.h>
@class UICollectionViewLayout;
@class UICollectionView;
@class UICollectionViewLayoutAttributes;
@class UILongPressGestureRecognizer;
#pragma - mark
NS_CLASS_AVAILABLE_IOS(6_0) @interface UICollectionReusableView : UIView
// 重用标识
@property (nonatomic, readonly, copy) NSString *reuseIdentifier;
// 重用前的准备
- (void)prepareForReuse;
// 应用布局的属性
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes;
// 动画
- (void)willTransitionFromLayout:(UICollectionViewLayout *)oldLayout toLayout:(UICollectionViewLayout *)newLayout;
- (void)didTransitionFromLayout:(UICollectionViewLayout *)oldLayout toLayout:(UICollectionViewLayout *)newLayout;
@end
#pragma - mark -
NS_CLASS_AVAILABLE_IOS(6_0) @interface UICollectionViewCell : UICollectionReusableView
@property (nonatomic, readonly) UIView *contentView; // 内容
@property (nonatomic, getter=isSelected) BOOL selected; // 是否选择
@property (nonatomic, getter=isHighlighted) BOOL highlighted; // 高亮
@property (nonatomic, retain) UIView *backgroundView; // 背景视图
@property (nonatomic, retain) UIView *selectedBackgroundView; // 选择后的背景视图
@end
网友评论