- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//Navigation Logic:
int storyIndex = [indexPath indexAtPosition: [indexPath length] -1];
NSString *storyLink = [[stories objectAtIndex: storyIndex] objectForKey:@"link"];
//cleaning up the link...
storyLink = [storyLink stringByReplacingOccurrencesOfString:@" " withString:@""];
storyLink = [storyLink stringByReplacingOccurrencesOfString:@"/n" withString:@""];
storyLink = [storyLink stringByReplacingOccurrencesOfString:@" " withString:@""];
NSLog(@"link: %@", storyLink);
//open in Safari
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:storyLink]];
}
Here is what shows up in the log:
2011-06-27 20:03:51.817 ParadiseBeats[26927:207] all done 2011-06-27 20:03:51.818 ParadiseBeats[26927:207] stories array had 20 items 2011-06-27 20:03:53.758 ParadiseBeats[26927:207] link: technobuffalo.com/companies/apple/…
But the link isn't actually opening in Safari. Thoughts?

New Topic/Question
Reply


MultiQuote



|