应用程序在 IOS 9 时在 AVPlayer TimeControlstatus 崩溃
App crashes in IOS 9 at AVPlayer TimeControlstatus
我的应用程序在 iOS 10 中运行,但在以下行崩溃
ViewModel.IsPlaying = (player.TimeControlStatus == AVPlayerTimeControlStatus.Playing
|| player.TimeControlStatus == AVPlayerTimeControlStatus.WaitingToPlayAtSpecifiedRate);
有错误
-[AVPlayer timeControlStatus]: unrecognized selector sent to instance 0x16fc83f0 An unhandled exception occured.
这发生在ios10以下,请帮忙
答案是 timeControlStatus
只能从 iOS 10 开始使用。
如所述,以下条件似乎非常相似:
(player.timeControlStatus == .playing) == (player.rate != 0.0)
我的应用程序在 iOS 10 中运行,但在以下行崩溃
ViewModel.IsPlaying = (player.TimeControlStatus == AVPlayerTimeControlStatus.Playing
|| player.TimeControlStatus == AVPlayerTimeControlStatus.WaitingToPlayAtSpecifiedRate);
有错误
-[AVPlayer timeControlStatus]: unrecognized selector sent to instance 0x16fc83f0 An unhandled exception occured.
这发生在ios10以下,请帮忙
答案是 timeControlStatus
只能从 iOS 10 开始使用。
如
(player.timeControlStatus == .playing) == (player.rate != 0.0)