• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
-remoteControlReceivedWithEvent: is not getting called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-remoteControlReceivedWithEvent: is not getting called


  • Subject: -remoteControlReceivedWithEvent: is not getting called
  • From: Steve Christensen <email@hidden>
  • Date: Tue, 27 Jul 2010 11:50:24 -0700

I am trying to get remote control events to start/stop some audio my app is playing, but -remoteControlReceivedWithEvent: isn't getting called. My app has a tab bar that switches among multiple views, if that makes any difference.

The view controller for each view implements the setup per Apple's docs on using remote control events (https://developer.apple.com/iphone/library/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/RemoteControl/RemoteControl.html#//apple_ref/doc/uid/TP40009541-CH7-SW1). I've copied those bits below for reference.

Any ideas on why -remoteControlReceivedWithEvent: isn't getting called? Should I be implementing it on another object in the responder chain?

steve


- (BOOL) canBecomeFirstResponder
{
	return YES;
}


- (void) viewWillAppear:(BOOL)animated
{
	[super viewWillAppear:animated];
	[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
	[self becomeFirstResponder];
}


- (void) viewWillDisappear:(BOOL)animated
{
	[super viewWillDisappear:animated];
	[UIApplication sharedApplication] endReceivingRemoteControlEvents];
	[self resignFirstResponder];
}

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Elapsed time vs sleep
  • Next by Date: Re: Elapsed time vs sleep
  • Previous by thread: MacTech Conference 2010: Registration Open
  • Next by thread: Test Applications under 10.4 without rebooting?
  • Index(es):
    • Date
    • Thread