I have an iOS application that looks up employees and shows their work number/mobile number. The problem I am having is after looking up one person and then another, when I click on the number of the person I just looked up, it keeps calling the number of the previously searched person.
And before anyone says anything, I have looked at UITextView link detection in iOS 7
I have tried setting the textview.text = nil, disabling and enabling selectable, editable and scrollEnabled. Nothing has worked. If anyone could please shed some light on the problem I am having, that would be great. Thank you!
- Lookup 1st employee, click on phone# and it calls correct number
- Lookup another employee (2nd employee), shows correct phone#, click on phone# and it calls 1st employee's phone#
- Lookup another employee (3rd employee), shows correct phone#, click on phone# and it still calls 1st employees phone#.
the UITextView has selectable = true, detection = phone numbers, editable = NO, have tried setting scroll enabled = YES and NO.
iOS Deployment target is 7.0
Code:
@property (weak,nonatomic) IBOutlet UITextView *Phone;
found = [happyArray valueForKey:@Extension"];
if ([found length]>0) _Phone.text = [NSString stringWithFormat:@"%@",[found stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]]];