UIDragPreview.h
2019-06-24 本文已影响0人
zhYx_
#if USE_UIKIT_PUBLIC_HEADERS || !__has_include(<UIKitCore/UIDragPreview.h>)
//
// UIDragPreview.h
// UIKit
//
// Copyright © 2017-�2018 Apple Inc. All rights reserved.
//
#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIKitDefines.h>
NS_ASSUME_NONNULL_BEGIN
@class UIDragPreviewParameters, UIView;
#pragma mark - 拖动过程中的预览 Class
#pragma mark -
/*
概述
- 拖动过程中,在屏幕上移动Item时(提升动画完成后),直到放下或取消动画的开始时,将显示拖动预览
- 将显示所提供视图的静态快照,不会显示对视图的后续更改,不会更改或移动视图
*/
UIKIT_EXTERN API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(watchos, tvos) @interface UIDragPreview : NSObject <NSCopying>
#pragma mark |实例化|
- (instancetype)initWithView:(UIView *)view parameters:(UIDragPreviewParameters *)parameters NS_DESIGNATED_INITIALIZER;
// 使用默认参数实例化
- (instancetype)initWithView:(UIView *)view;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
/// 与拖动预览关联的视图
@property (nonatomic, readonly) UIView *view;
/// 与拖动预览关联的外观参数
@property (nonatomic, readonly, copy) UIDragPreviewParameters *parameters;
@end
NS_ASSUME_NONNULL_END
#else
#import <UIKitCore/UIDragPreview.h>
#endif