共用方式為


HMHome.AddTrigger(HMTrigger, Action<NSError>) 方法

定義

將 新增 trigger 至首頁,並在新增之後執行 completion

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

參數

trigger
HMTrigger
completion
Action<NSError>

作業完成時要執行的處理常式。

屬性

適用於