Hi all,
Hopefully a nice and quick one for you... the below code is working fine on the simulator, but not working on the iPhone, any ideas?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if([[dataTable cellForRowAtIndexPath:indexPath].textLabel.text isEqualToString:@"Telephone"]){
NSString *tel = [[[NSString alloc] initWithFormat:(@"tel://%@"),[selectedData objectForKey:@"telephone"]] autorelease];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:tel]];
} else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.apple.com"]];
}
}
**Edit
To expand a little by not working I mean, when the (in this case) second tableview cell is clicked Safari pops up with www.apple.com on the Simulator. Nothing happens with the other command as no phone on simulator. But on iphone nothing happens on either cell click.