UIDragPreviewParameters.h
2019-06-24 本文已影响0人
zhYx_
#if USE_UIKIT_PUBLIC_HEADERS || !__has_include(<UIKitCore/UIDragPreviewParameters.h>)
//
// UIDragPreviewParameters.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 UIBezierPath, UIColor;
#pragma mark - 拖动预览的外观参数 Class
#pragma mark -
UIKIT_EXTERN API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(watchos, tvos) @interface UIDragPreviewParameters : NSObject <NSCopying>
#pragma mark |实例化|
- (instancetype)init NS_DESIGNATED_INITIALIZER;
// 如果拖动项是一系列文本,请使用此方法实例化(textLineRects:每个NSValue对象在视图的坐标系中包含一个CGRect结构,表示文本的位置)
- (instancetype)initWithTextLineRects:(NSArray<NSValue /* CGRect */ *> *)textLineRects;
/// 预览中要显示的视图部分(贝塞尔路径;设置为nil时,默认显示整个视图)
@property (nonatomic, copy, nullable) UIBezierPath *visiblePath;
/// 预览的背景颜色
@property (nonatomic, copy, null_resettable) UIColor *backgroundColor;
@end
NS_ASSUME_NONNULL_END
#else
#import <UIKitCore/UIDragPreviewParameters.h>
#endif