HMHome.AddActionSet(String, Action<HMActionSet,NSError>) 方法

定义

将名为 的操作 actionSetName 集添加到主页,并在添加操作集后运行 completion

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

参数

actionSetName
String
completion
Action<HMActionSet,NSError>

一个在成功时返回的 null 处理程序,或在失败时返回错误对象。

属性

适用于