开发者

how to access value of selected row tableview?

开发者 https://www.devze.com 2023-01-08 05:53 出处:网络
I am new to objective-c and i h开发者_如何转开发ave created a application in which there is registrationpage.In this i have country option which is selected by user from tableview in next page.After s

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

0

精彩评论

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

关注公众号