共用方式為


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 ,且裝置尚未移動一段時間,系統可能會在偵測到移動之前關閉更新。

適用於