i have got two view.
First: FirstViewController
Second: SecondViewController
FirstViewController is my UINavigationController‘s root controller and inside FirstViewController I ve got UITableView. When a cell is clicked in UITableView, the view is navigated to SecondViewController. Inside SecondViewController i have UILabel. I want to assign this UILabel’s value to the cell which is clicked at FirstViewController when Back button is clicked in Navigation Bar. What am i supposed to do to implement this?
I can pass value to SecondViewController from FirstViewController by creating:
SecondViewController *sv;
sv.somestring = someanotherstring;
but can not implement this at SecondViewController to pass the value to a NSString in FirstViewController.
Can u help me please?
Thank you.
ae
Ya , there is much a easy way to handle this…..
You can take a Global Variable
In your Delegate.h file declare your variable:
Secondly in Delegate.m file
This is Done .Now you can use this String Variable in All/any class you want..
To use this Global Variable.
Just import you Delegate file make the obj of it….
Now in Your class.m
Now you can access it anywhere in your class by this Object:
Just follow my Steps Carefully , I am sure this is definitely going to help you…..
Have a easy life,