< UIKit >

UIDragItem.h

2019-06-24  本文已影响0人  zhYx_

#if USE_UIKIT_PUBLIC_HEADERS || !__has_include(<UIKitCore/UIDragItem.h>)
//
//  UIDragItem.h
//  UIKit
//
//  Copyright © 2017-�2018 Apple Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKitDefines.h>

NS_ASSUME_NONNULL_BEGIN

@class UIDragPreview;





#pragma mark - 拖动项 Class
#pragma mark -
UIKIT_EXTERN API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(watchos, tvos) @interface UIDragItem : NSObject

#pragma mark |实例化|
- (instancetype)initWithItemProvider:(NSItemProvider *)itemProvider NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

/// 提供拖动Item
@property (nonatomic, readonly) __kindof NSItemProvider *itemProvider;
/// 拖动Item的附加信息
@property (nonatomic, strong, nullable) id localObject;
/// 拖动Item的可视预览(设置为nil,则使用系统默认预览)
@property (nonatomic, copy, nullable) UIDragPreview * _Nullable (^previewProvider)(void);

@end





NS_ASSUME_NONNULL_END

#else
#import <UIKitCore/UIDragItem.h>
#endif

上一篇下一篇

猜你喜欢

热点阅读