Search Results

Search found 1 results on 1 pages for 'holtii'.

Page 1/1 | 1 

  • how to link static cells to Outlet/Actions - E.G tap the call cell to call the number

    - by holtii
    The code I have. By the way, I can't get Call to work and Website does not open either! - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSString *urlToOpen = @""; if( indexPath.section == 0 ){ // call number urlToOpen = @"tel:442074036933"; } else if( indexPath.section == 1 ){ // open website urlToOpen = @"http://www.designmuseum.org"; } else { // open address urlToOpen = @"http://maps.apple.com/maps?daddr=Design+Museum+London"; } [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlToOpen]]; NSString *destinationAddress = [NSString stringWithFormat:@"%@+%@+%@", [address street], [address city], [address country]]; NSString *sourceAddress = [LocalizedCurrentLocation currentLocationStringForCurrentLanguage]; NSString *url = [NSString stringWithFormat:@"http://maps.apple.com/maps?saddr=%@&daddr=%@", [sourceAddress stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], [destinationAddress stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]]; I need to add destination address which for my App is = 28 Shad Thames, London, United Kingdom. Which format to write it in? because I cant get it to work and really need to sort this problem of my app real quick

    Read the article

1