I have got an ios project with NavigationViewController
, TableVC
and DetailVC
.
In my detail view controller i have got a video. If the app starts playing the video and i go back to the tableVC
the sound still can be heard and notes in consul from detail view are adding. I can't use viewDidDisappear
function to stop the video because it's called when the video is getting full screen too.
I also use SWRevealViewController
in my app to display slide out menu.
ARC is turned on.
Please, help me.
Asked
Active
Viewed 46 times
0

serg_ov
- 563
- 7
- 18
-
First of all excuse my poor english, but can't you just override the "goBack" method and call the stop function from MPMoviePlayerController? Hope it helps – washloops Jul 16 '14 at 15:32
-
I can override viewDidDisappear method, but as i mentioned above - that is not the case. If you know what the method is called when user taps "back" button of navigation controller, o swipe back - tell me and I will be grateful. – serg_ov Jul 16 '14 at 15:36
-
I dont know the exact method, but you can override the button as well. I'll post it as an answer :) – washloops Jul 16 '14 at 15:39
1 Answers
0
You can override the button and make it call whatever method you want:
UIBarButtonItem *btn = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemSearch
target:self
action:@selector(myMethod)];
self.navigationItem.leftBarButtonItem = btn;
Hope it helps :)

washloops
- 147
- 3
-
Thanks for trying to help me, but that is not what i want. That button is already set it's not the only way to leave the detail view - user can also swipe from left to get back. – serg_ov Jul 16 '14 at 20:28