开发者

Trouble refreshing UITableView

开发者 https://www.devze.com 2022-12-27 15:23 出处:网络
I\'m trying to develop a basic GPA Calculator. I have an AllCourses class that holds Course objects. I have an AllCourses object in my CalcAppDelegate.

I'm trying to develop a basic GPA Calculator. I have an AllCourses class that holds Course objects.

I have an AllCourses object in my CalcAppDelegate.

In my ThirdViewController I can successfully update the number of Courses in my AllCourses object. However, 开发者_如何学JAVAthe problem I'm having is that when I switch to the RootViewController the UITable isn't being repopulated with the updated Courses that were added.

I tried [self reloadData] in the viewWillAppear in my RootViewController but it caused my app to close. I didn't use IB to create the views so I think it could be the case that I don't have things hooked up correctly. I did it programatically. Does anyone see anything I'm missing in my code?

Here is the link to my project http://files.me.com/aahrens/q0odzi


Try

[[self tableView] reloadData]

The method is implemented in UITableView rather than in UITableViewController, which is why your app crashed.


have you tried [self.tableView reloadData]

0

精彩评论

暂无评论...
验证码 换一张
取 消