0

I'm getting a warning saying that detectsPhoneNumbers is deprecated. Any help pls..

textScrollView.detectsPhoneNumbers = NO;
Abizern
  • 146,289
  • 39
  • 203
  • 257
SJ Reddy
  • 577
  • 1
  • 4
  • 13
  • 4
    I don't want to sound like a prick. But, you really should have been able to find this one on your own. All you had to do was search for "detectsPhoneNumbers" on developer.apple.com and you would have found the answer in less time than it took you to post the question. Slight exaggeration, but you get my drift. – ynnckcmprnl Nov 18 '10 at 09:48
  • @Yannick..sorry I should have done that...anyway tnx... – SJ Reddy Nov 18 '10 at 10:50
  • Again, not to be a jerk, but you've asked about two other deprecated methods: http://stackoverflow.com/questions/4206848/setfont-depricated , http://stackoverflow.com/questions/4107392/setallowsimageediting-is-deprecated and replacements for both could have been found easily in the documentation. Next time you encounter this, do a search for the method and look under its title in the documentation. Apple usually tells you what to use instead of this method right next to where they say it's deprecated. – Brad Larson Nov 18 '10 at 15:53
  • @Brad..Yes Brad, I agree with you. I did posted that questions earlier. From now on I will not ask deprecated questions. Cheers. – SJ Reddy Nov 18 '10 at 16:13

1 Answers1

7

Taken from the documentation:

Deprecated in iOS 3.0. Use dataDetectorTypes instead.

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
};
Francois
  • 10,730
  • 7
  • 47
  • 80