Bagikan melalui


HMHome.AddAccessory(HMAccessory, Action<NSError>) Metode

Definisi

accessory Menambahkan ke beranda dan berjalan completion setelah ditambahkan.

[Foundation.Export("addAccessory:completionHandler:")]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void AddAccessory (HomeKit.HMAccessory accessory, Action<Foundation.NSError> completion);
abstract member AddAccessory : HomeKit.HMAccessory * Action<Foundation.NSError> -> unit
override this.AddAccessory : HomeKit.HMAccessory * Action<Foundation.NSError> -> unit

Parameter

accessory
HMAccessory
completion
Action<NSError>

Handler yang kembali null berhasil, atau objek kesalahan pada kegagalan.

Atribut

Berlaku untuk