how to access value of selected row tableview?
I am new to objective-c and i h开发者_如何转开发ave created a application in which there is registration page.In this i have country option which is selected by user from tableview in next page.After selecting from tableview that country name should appear in country textfield on previous page.I am saving that country name in global variable but still am not able to access that variable on previous page because viewDidLoad method is not getting called when i am returning from next page.I also tried viewWillAppear but it doesn't work. thanks in advance.....
You can use these two methods on UITableView
to access the selected row.
- (NSIndexPath *)indexPathForSelectedRow
– cellForRowAtIndexPath:
Look at the documentation for UITableView
精彩评论