我創造的一些記錄數組,並希望進行電話設施選擇任何cell..like 8904490035打電話給
-(void)viewDidLoad {
arryAppleProducts = [[NSArray alloc] initWithObjects:@"8904490035",@"iPod",@"MacBook",@"MacBook Pro",nil];
arryAdobeSoftwares = [[NSArray alloc] initWithObjects:@"Flex",@"AIR",@"Flash",@"Photoshop",nil];
arryAdobeSoftwares1 = [[NSArray alloc] initWithObjects:@"one",@"two",@"three",@"four",nil];
self.title = @"Simple Table Exmaple";
[super viewDidLoad];
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NextViewController *nextController = [[NextViewController alloc] initWithNibName:@"NextView" bundle:nil];
[self.navigationController pushViewController:nextController animated:YES];
if(indexPath.section == 0)
[nextController changeProductText:[arryAppleProducts objectAtIndex:indexPath.row]];
else if(indexPath.section==1)
[nextController changeProductText:[arryAdobeSoftwares objectAtIndex:indexPath.row]];
else
[nextController changeProductText:[arryAdobeSoftwares1 objectAtIndex:indexPath.row]];
}
不清楚你在問什麼 –
你想要做什麼didSelectRowAtIndexPath –
對於電話呼叫使用[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@「tel:42342334234」]]; – cjd