0

我試圖建立畫中畫對我的iPad應用程序,我有一個自定義視頻播放器,所以我下面的示例代碼:https://developer.apple.com/library/ios/samplecode/AVFoundationPiPPlayer/Introduction/Intro.html的Objective-C:如何使用AVPictureInPictureController

我在執行本下面Objective-C和代碼的第二行給出了錯誤「物業isPictureInPictureSupported不是類型AVPictureInPictureController的對象中找到。

AVPictureInPictureController *controller = [[AVPictureInPictureController alloc]init]; 

if (controller.isPictureInPictureSupported) { 

回答

1

isPictureInPictureSupported類方法AVPictureInPictureController,不是一個實例屬性。所以你打電話它是這樣的:

if ([AVPictureInPictureController isPictureInPictureSupported]) { 
相關問題