detectPhoneNumbers已弃用?

时间:2010-11-18 09:26:21

标签: iphone objective-c

我收到警告说不推荐使用detectPhoneNumbers。 任何帮助请..

textScrollView.detectsPhoneNumbers = NO;

1 个答案:

答案 0 :(得分:7)

取自documentation

  

在iOS 3.0中已弃用。使用   而是dataDetectorTypes。

UIDataDetectorTypes

Defines the types of information that can be detected in text-based content.

enum {
   UIDataDetectorTypePhoneNumber   = 1 << 0,
   UIDataDetectorTypeLink          = 1 << 1,
   UIDataDetectorTypeAddress       = 1 << 2,
   UIDataDetectorTypeCalendarEvent = 1 << 3,
   UIDataDetectorTypeNone          = 0,
   UIDataDetectorTypeAll           = NSUIntegerMax
};
相关问题