I'm having problem to control the iPhone controls with my avplayer.

if I put the function

- (void)remoteControlReceivedWithEvent:(UIEvent *)event

in the view controller that responsible for playing the function called but only if I i'm going to background in the current view controller.

if i'm going to background from other view controller the function never called.

that's why i want to put it in the app delegate.

I tried Becomefirstresponse and to put the function in every view controller but it did help.

also I call

[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];

in the

-(void)applicationWillResignActive:(UIApplication *)application

thanks

Edit
Report