- 方法1: 實作 remoteControlReceivedWithEvent
- (void)remoteControlReceivedWithEvent:(UIEvent *)event
{
if (event.subtype == UIEventSubtypeRemoteControlStop)
{
// 會觸發這裡
}
}
- 方法2: 使用 MPRemoteCommand, 可參考 TaiwanRadio .
- (void)remoteControlReceivedWithEvent:(UIEvent *)event
{
if (event.subtype == UIEventSubtypeRemoteControlStop)
{
// 會觸發這裡
}
}
本文标题:如何使用內建計時器停止播放音樂
本文链接:https://www.haomeiwen.com/subject/dxdjhttx.html
网友评论