共用方式為


SKView.Delegate 屬性

定義

SpriteKit.ISKViewDelegate 模型類別的實例,做為類別委派。

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 12, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual SpriteKit.ISKViewDelegate Delegate { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 12, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("delegate", ObjCRuntime.ArgumentSemantic.Weak)] get; [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 12, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("setDelegate:", ObjCRuntime.ArgumentSemantic.Weak)] set; }
member this.Delegate : SpriteKit.ISKViewDelegate with get, set

屬性值

SpriteKit.ISKViewDelegate 模型類別的實例

屬性

備註

指派給這個物件的委派實例將用來處理事件,或視需要提供資料給這個類別。

設定 Delegate 或 WeakDelegate 值事件時,會傳遞至指定的實例,而不是傳遞至 C# 樣式事件

這是物件的強型別版本,如果開發人員只想要指派衍生自 NSObject 且已使用 [Export] 屬性裝飾的類別,則應該改用 WeakDelegate 屬性。

適用於