#if USE_UIKIT_PUBLIC_HEADERS || !__has_include(<UIKitCore/UICollectionViewTransitionLayout.h>)
//
// UICollectionView.h
// UIKit
//
// Copyright (c) 2012-2018 Apple Inc. All rights reserved.
//
#import <UIKit/UICollectionViewLayout.h>
NS_ASSUME_NONNULL_BEGIN
#pragma mark - 集合视图过度布局 Class
#pragma mark -
/*
- 用于对布局更新进行动画
*/
NS_CLASS_AVAILABLE_IOS(7_0) @interface UICollectionViewTransitionLayout : UICollectionViewLayout
/// 过度布局完成的百分比
@property (assign, nonatomic) CGFloat transitionProgress;
/// 当前布局
@property (readonly, nonatomic) UICollectionViewLayout *currentLayout;
/// 新布局
@property (readonly, nonatomic) UICollectionViewLayout *nextLayout;
/* 实例化 */
- (instancetype)initWithCurrentLayout:(UICollectionViewLayout *)currentLayout nextLayout:(UICollectionViewLayout *)newLayout NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
// 设置可设置动画的键的值
- (void)updateValue:(CGFloat)value forAnimatedKey:(NSString *)key;
// 通过Key搜索最近设置的过度动画
- (CGFloat)valueForAnimatedKey:(NSString *)key;
@end
NS_ASSUME_NONNULL_END
#else
#import <UIKitCore/UICollectionViewTransitionLayout.h>
#endif
网友评论