I am developing an iOS app with a tab bar controller. In the first tab, I placed an instance of AVQueuePlayer to start playing music from the web. I did all coding to allow play and pause events through remote control events. But I could able to receive remote control events only when I stay in the first tab. When I switch to other tabs, remote control events are not received to the first tab.
When I place the following lines in first tab view controller, I can receive remote control events to first tab even when I stay in second tab.
- (BOOL)canResignFirstResponder
{
return NO;
}
But I have some text fields in other views with which the user has to interact. By not resigning first responder in first tab, I cannot input text in other tabs.
Please help me how can I handle remote control events to control an AVQueuePlayer instance in first tab while my user interacts with the app in second tab ?
Thanks for your help !