views:

15

answers:

0

Hi all ! I'm in trouble :-) the deal : 

I have made a Tab Bar based app, i set up a first UIViewController with a nav controller. 

The first controller uses TableView to display Data and push a controller which uses some of the Data in the tableView to display it in UILbel and UITextView.

The second controller is made of an Acceleromter Delegate, UIImageView animation.  I use a Singleton to load data, import it using #import. When Shake is detected my UIImageView commit animation. 

Everything is ok but there is my problem: when the app is launched, first controller is loaded when i switch to the second do what i have to do and switch back to the first controller labels and textView are set to default like in IB (lorem ipsum...).

Don't know what to do. 

If i delete the UIImageView animation made of an array of 15 Uiimage (png) the problem doesn't happen.

Noticed that it only happens on the first time i launch the 2nd controller, if i switch back to the first controller go back using nav bar and reload using table view, then switch the 2nd go back labels and textview don't change and won't change anymore.

Is this because i use singletons ? I have Heard not a good solution. if i use singleton is because i have to share data with a third controller.

Is there a way to retain data if data are created in the view controller which use table view (UITableView protocol) and this data are display in another controller.  because i use my method changeProductText in the didSelectRowAtIndexPath: to set the label and textview i display in the next controller.

How can i refresh data when u switch to item in tab bar app

thanks to all !!!