- 方法1: 實作 remoteControlReceivedWithEvent
- (void)remoteControlReceivedWithEvent:(UIEvent *)event
{
if (event.subtype == UIEventSubtypeRemoteControlStop)
{
// 會觸發這裡
}
}
- 方法2: 使用 MPRemoteCommand, 可參考 TaiwanRadio .
- (void)remoteControlReceivedWithEvent:(UIEvent *)event
{
if (event.subtype == UIEventSubtypeRemoteControlStop)
{
// 會觸發這裡
}
}