Mat
Mat

Reputation: 7633

Access UITableView from view,get a value and come back.(IPHONE)

i've a problem, in which way could i access with a normal button that i've in a view to a uitableview, get a value from a cell and set a text label(that is in the first view) whit this value and then com back on the first view with a back button?

Thanks in advance.

Upvotes: 1

Views: 286

Answers (1)

iwasrobbed
iwasrobbed

Reputation: 46703

Mat,

Easiest way is to just have the value in the cell be captured in a global varialble (you can set up global variables either in the App Delegate or in a Singleton) and that way all the button has to do is grab that variable's value instead of going into the UITableView to get a certain cell value.

Rob

p.s. a good article to read: http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html

Upvotes: 1

Related Questions