2010-11-18 60 views
0

我收到一條警告,指出已檢測到iPhoneNumbers已被棄用。 任何幫助請..檢測到iPhoneNumbers已被棄用?

textScrollView.detectsPhoneNumbers = NO; 
+4

我不想聽起來像一個刺。但是,你真的應該能夠自己找到這個。您只需在developer.apple.com上搜索「檢測到的電話號碼」,您就可以在更短的時間內找到答案,而不會讓您發佈問題。稍微誇張,但你得到我的漂移。 – 2010-11-18 09:48:29

+0

@ Yannick..sorry我應該做到這一點......反正TNN ... – 2010-11-18 10:50:49

+0

再次,不是一個混蛋,但你已經問過其他兩個不贊成使用的方法:http://stackoverflow.com/questions/4206848/setfont-depricated,http://stackoverflow.com/questions/4107392/setallowsimageediting-is-deprecated和兩個替換都可以很容易地在文檔中找到。下一次遇到這種情況時,請搜索該方法並在文檔的標題下查找。蘋果通常會告訴你應該使用什麼而不是這種方法,他們認爲它已被棄用。 – 2010-11-18 15:53:33

回答

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 
};