Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- // Navigation logic
- if(indexPath.row == 0 && indexPath.section == 2){
- NSString * storyLink = [currentStory objectForKey: @"link"];
- // clean up the link - get rid of spaces, returns, and tabs...
- 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]];
- }
Add Comment
Please, Sign In to add comment