开发者

UITableViewController won't refresh after selection -> return to table

开发者 https://www.devze.com 2023-02-23 04:35 出处:网络
I\'m using a Window Template with a Navigation Controller and standard a UITableViewController. 开发者_JAVA技巧When a row is selected, new UITableViewController pops up, and when a row in that table i

I'm using a Window Template with a Navigation Controller and standard a UITableViewController. 开发者_JAVA技巧When a row is selected, new UITableViewController pops up, and when a row in that table is selected, a new view with a webpage pops up.

Now when I navigate through this, and return to the first UITableViewController, and select another row, I always see the values of the first row I selected.

So it won't refresh or get the new data or update the table I don't know. (2nd UITableViewController and 3rd view with webpage always has the same information on it).

Also I'm using viewDidLoad for doing everything, tried viewDidAppear as well but that didn't seem to work out as well..

Thx in advance

W


try this,

add following line(as first line) in your tableView:didSelectRowAtIndexPath:

[tableView deselectRowAtIndexPath:indexPath animated:YES];

thanks.

0

精彩评论

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