• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: won't work call from uitableview cell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: won't work call from uitableview cell


  • Subject: Re: won't work call from uitableview cell
  • From: Naresh Kongara <email@hidden>
  • Date: Thu, 4 Nov 2010 17:18:20 -0700

On Nov 4, 2010, at 8:27 AM, Keary Suska wrote:

> On Nov 3, 2010, at 11:36 AM, Субач Павел Витальевич wrote:
>
>> Need some help, i want call from choose cell in my table with phone number:
>>
>> - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
>> 	NSString *phoneString = [NSString stringWithFormat:@"tel://%@";, [dataArray objectAtIndex:indexPath.row]];
>> 	[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneString]];
>> }
>
> Technically the URL scheme is tel:# (no "//"), so that may be an issue.

Don't try in simulator, In simulator this call will effect nothing. Test this call in device only.


>
>> And second question, how i can get phone number from cell with mix content (how recognize phone number in string)?
>> such as [13880023323 office 302]
>> 			phone		  text 	 number
>
> Only UITextView and UIWebView have data detectors (AFAIK), but there is no programmatic interface to them that I know of so you will have to parse the numbers you will have to extract the relevant portion manually.

You can use NSSCanner for parsing your string. Pls look into NSScanner API.


>
> HTH,
>
> Keary Suska
> Esoteritech, Inc.
> "Demystifying technology for your home or business"
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >won't work call from uitableview cell (From: Субач Павел Витальевич <email@hidden>)
 >Re: won't work call from uitableview cell (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: Setting (not saving) NSPersistentDocument Metadata changes file Modification Date
  • Next by Date: Subject: Re: iPad frame-by-frame animation
  • Previous by thread: Re: won't work call from uitableview cell
  • Next by thread: CALayer renderInContext: performance
  • Index(es):
    • Date
    • Thread