CLLocationManager.ActivityType 属性

定义

用于提供操作系统线索,以提高功耗/准确性。

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual CoreLocation.CLActivityType ActivityType { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("activityType", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)] get; [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("setActivityType:", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)] set; }
member this.ActivityType : CoreLocation.CLActivityType with get, set

属性值

默认值为 Other

属性

注解

应用程序开发人员应尽可能设置此属性。 它为系统提供有关应用程序需求的线索。 例如,如果设置为 AutomotiveNavigation 并且设备一段时间未移动,系统可能会关闭更新,直到检测到移动。

适用于