views:

30

answers:

1

I am using this http://imthi.com/blog/programming/iphone-rss-reader-application-with-source-code.php as a start for my rss reader in my app for loading news. I am trying to get it when you select a cell row it opens the link in safari instead of another viewcontroller. I am still learning how to develop for iPhone. This is what opens the new view which I want to open in safari, it is probably simple but since Im new to this I can't figure it out.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[[self appDelegate] setCurrentlySelectedBlogItem:[[[self rssParser]rssItems]objectAtIndex:indexPath.row]];
[self.appDelegate loadNewsDetails];

}

Thanks for help in advance.

+1  A: 

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"THE RSS URL"]];

Aaron Saunders
ok that helps now I got this: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSString * linkUrl = [[[self appDelegate]currentlySelectedBlogItem]linkUrl]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:linkUrl];} It just gives me Expected ']' before ';' token at the openurl line.
Thadon
Ok I got that error fixed (stupid mistake) now it just doesn't do anything when you click on a cell.
Thadon
add some code? the question has been answered... but there must be some error in your code
Aaron Saunders
Ok, thank you very much for the code. After realizing I missed a part of it I got it to work.
Thadon