美文网首页
UICollectionViewCell.h

UICollectionViewCell.h

作者: ShenYj | 来源:发表于2016-09-02 22:33 被阅读88次

#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

网友评论

      本文标题:UICollectionViewCell.h

      本文链接:https://www.haomeiwen.com/subject/gpdkettx.html