Düzenle

Aracılığıyla paylaş


AVAudioSession.WeakDelegate Property

Definition

An object that can respond to the delegate protocol for this type

[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, "Use 'AVAudioSession.Notification.Observe*' methods instead.")]
public virtual Foundation.NSObject WeakDelegate { [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("delegate", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)] [ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, "Use 'AVAudioSession.Notification.Observe*' methods instead.")] get; [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("setDelegate:", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)] [ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, "Use 'AVAudioSession.Notification.Observe*' methods instead.")] set; }
member this.WeakDelegate : Foundation.NSObject with get, set

Property Value

The instance that will respond to events and data requests.

Attributes

Remarks

The delegate instance assigned to this object will be used to handle events or provide data on demand to this class.

When setting the Delegate or WeakDelegate values events will be delivered to the specified instance instead of being delivered to the C#-style events

Methods must be decorated with the [Export ("selectorName")] attribute to respond to each method from the protocol. Alternatively use the Delegate method which is strongly typed and does not require the [Export] attributes on methods.

Applies to