iOS 5 中 MPMusicPlayerController 发生了变化吗?
我有一个应用程序在 iOS 4.3 中正常工作,升级到 iOS 5 后它的行为方式不同。
在 iOS 4.3 上执行这些行后,mp.playbackState 设置为 MPMusicPlaybackStatePaused,但在 iOS 5 中它仍然设置为 MPMusicPlaybackStatePlaying。
MPMusicPlayerController *mp = [MPMusicPlayerController applicationMusicPlayer];
if(mp.playbackState == MPMusicPlaybackStatePlaying)
[mp pause];
我假设playbackState 没有在同一事件循环内更新,可以吗?
I had an app which worked correctly in iOS 4.3, after upgrading to iOS 5 it behaves in another way.
After executing these lines on iOS 4.3 mp.playbackState is set to MPMusicPlaybackStatePaused, however in iOS 5 it is still set to MPMusicPlaybackStatePlaying.
MPMusicPlayerController *mp = [MPMusicPlayerController applicationMusicPlayer];
if(mp.playbackState == MPMusicPlaybackStatePlaying)
[mp pause];
I assume that playbackState is not updated within the same event loop, is it ok?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为问题是:
在iOS5中并不总是正确的。
这对我来说工作:
I think the issue is:
in iOS5 is not always correct.
This work for me: