共用方式為


AVCaptureDevice.ActiveFormat 屬性

定義

目前使用中的 AVCaptureDevice 格式。

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual AVFoundation.AVCaptureDeviceFormat ActiveFormat { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("activeFormat", ObjCRuntime.ArgumentSemantic.Strong)] get; [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("setActiveFormat:", ObjCRuntime.ArgumentSemantic.Strong)] set; }
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 7, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual AVFoundation.AVCaptureDeviceFormat ActiveFormat { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("activeFormat", ObjCRuntime.ArgumentSemantic.Strong)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 7, ObjCRuntime.PlatformArchitecture.All, null)] get; [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("setActiveFormat:", ObjCRuntime.ArgumentSemantic.Strong)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 7, ObjCRuntime.PlatformArchitecture.All, null)] set; }
member this.ActiveFormat : AVFoundation.AVCaptureDeviceFormat with get, set

屬性值

屬性

備註

應用程式開發人員通常會使用 SessionPresetPreferred* 方法來 SharedInstance() 設定擷取格式。 不過,裝置的格式可能超出預設,在此情況下,可能會設定此屬性。

嘗試設定無法使用的格式將會擲回 T:Foundation.NSInvalidArgumentException

適用於