0

i had 2 scene, "List Scene" and "Details Scene". After Click the Item on "List Scene", it will go to "Details Scene". In the "Details Scene", i had some animation, anime the Image keep repeat move from left to right or right to left. After i go back "List Scene", the scene looking like "hanging", i cant do any thing for the List any more(like scrolling). After i check out, found out the "Left to Right,Right To Left" animation is still running on behind. So now i assume, because the previous scene i still running, so current scene not able to detect my finger.

so my question is, is that got any way can remove/release/dismiss the previous scene after popviewcontrolleranimated? below is the code i testing now.

-(void)viewWillDisappear:(Bool)animated{
[super viewWillDisappear:animated];
self.imagePanViewController = nil; //target is this viewcontroller, this viewcontroller handle the animation
[self.navigationController setNavigationBarHidden:NO animated:YES];
}

i had try use some way like "dismissViewController", release, controller = nil, and so on. but the results is still fail and animation keep running on behind.

is that any one can give me some guideline or hints? thanks alot!

Lazarus
  • 429
  • 2
  • 7
  • 14
  • Not clear. Please add the source for "Left to Right,Right To Left" animation – bllakjakk Sep 21 '14 at 18:58
  • @bllakjakk, the animation source is combine it many file and class. is that really need put all at here? i though got some way to destroy/release/dismiss whole viewcontroller whatever how the viewcontroller inside? – Lazarus Sep 22 '14 at 02:46

1 Answers1

0

I believe myidleTimer is an NSTimer. NSTimer retains its target. You can follow the below link to properly invalidate it Best time to invalidate NSTimer inside UIViewController to avoid retain cycle

Also make the timer having weak reference.

Community
  • 1
  • 1
Kaustav De
  • 31
  • 3
  • i had update the code, sorry for misdirection. the "myidleTimer" had stoped. just the problem is the "self.imagePanViewController", because the this ViewController still running on behind even i on "List Scene". – Lazarus Sep 22 '14 at 02:48