What I'm working on
I'm working on a news app. A tableview with news items and more information when you click an item.
What I've done
Parse an online XML document. Display images + title from XML document and put it in a Table View. Works fine here. I also created a .h and .m file for the detailed news view. It contains a larger image and text, all dummy and placeholders.
Where I need your help
I need to connect each newsitem with this detailed view. I'm kinda stuck here.. I've tested my code as far as seeing weather I have all the data I need:
Code:
NSString *testString = [blogEntries objectAtIndex:indexPath.row];
NSString *msg = [[NSString alloc] initWithFormat:@"Current item selected: %@", testString];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Test item" message:msg delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
[testString release];
[msg release];
The code above works fine. It displayed the complete node from my XML document. What I want is an instance from newsDetailView.h / newsDetailsView.m and fill it up with the information from the current selected item. And slide it in from the right of the screen.
The code below works but, needless to say, it doesn't fill the dummy text and placeholders with the actual values.
How do I do that?
Code:
nieuwsDetailView *NieuwsDetailView = [[nieuwsDetailView alloc] initWithNibName:@"NieuwsDetailView" bundle:nil];
[self.navigationController pushViewController:NieuwsDetailView animated:YES];
[NieuwsDetailView release];
Thanks in advance, I really appreciate any help!