Loading a data view from a UITableView list of items
Okay, so i've been playing with Xcode and learning objective c for about a week now so i'm still pretty new to it all.
So i've started creating an iPhone app. I开发者_如何学JAVA wanted a screen where it would list some items and then when you clicked one of the items it would take the user to a different screen. I found and read a few tutorials on this which were great. However, when i implemented their code into my already created project, it didn't seem to work. I was able to click a button from the first view on my app and it wold successfully display the list of items, but when it came to clicking them, the view didn't change. So i downloaded the source from these tutorials and it worked great in their project but when i copied the code line-for-line into mine, it didn't work.
I've been at this for a couple days now and im hours from tearing my hair out haha!
I don't get any errors at all. It just simply won't change view when clicking on one of the table items.
I feel bad for asking, but im really struggling with this and if anyone has a few minutes to take a look at my project that would be fantastic, just really want to know what's wrong with it and get it fixed.
You can find my project here.
Once again thanks a lot if you get chance to download and have a look at it, much appreciated.
Cheers,
Nathan
Thanks for your help guys, but in the end it just seemed like it wasn't ever going to work so i just started a new project, navigation based. Which works fine now :)
I recommend you check out the sample Apple apps in the documentation for UITableViewController. If you search for UITableViewController in the documentation, the top of the description provides you with a list of sample apps in which they have used that tag.
UITableViewController Class Reference
when you click into viewCtrl at the first time, the viewDidLoad will be called, then you go back and return, that function will not be called. So maybe you could reloadData again in the viewDidAppear, then the tableViewCtrl will display correctly.
精彩评论