#if USE_UIKIT_PUBLIC_HEADERS || !__has_include(<UIKitCore/UIDataDetectors.h>)
//
// UIDataDetectors.h
// UIKit
//
// Copyright (c) 2009-2018 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
/* 文本中包含的信息类型 <位移枚举> */
typedef NS_OPTIONS(NSUInteger, UIDataDetectorTypes) {
UIDataDetectorTypePhoneNumber = 1 << 0, /// 检测可格式化为电话号码的字符串
UIDataDetectorTypeLink = 1 << 1, /// 检测可格式化为URL的字符串
UIDataDetectorTypeAddress NS_ENUM_AVAILABLE_IOS(4_0) = 1 << 2, /// 检测可格式化为地址的字符串(街道地址)
UIDataDetectorTypeCalendarEvent NS_ENUM_AVAILABLE_IOS(4_0) = 1 << 3, /// 检测可格式化为日历事件的字符串
UIDataDetectorTypeShipmentTrackingNumber NS_ENUM_AVAILABLE_IOS(10_0) = 1 << 4, /// 检测可格式化为快递订单号的字符串
UIDataDetectorTypeFlightNumber NS_ENUM_AVAILABLE_IOS(10_0) = 1 << 5, /// 检测可格式化为航班号的字符串
UIDataDetectorTypeLookupSuggestion NS_ENUM_AVAILABLE_IOS(10_0) = 1 << 6, /// 检测可格式化为用户可能想要查找的信息的字符串
UIDataDetectorTypeNone = 0, /// 无检测
UIDataDetectorTypeAll = NSUIntegerMax /// 检测所有可用类型的数据(包括稍后可能添加的类型)
} API_UNAVAILABLE(tvos);
#else
#import <UIKitCore/UIDataDetectors.h>
#endif
网友评论