次の方法で共有


NSTimer.CreateTimer メソッド

定義

オーバーロード

CreateTimer(Double, Action<NSTimer>)
CreateTimer(TimeSpan, Action<NSTimer>)
CreateTimer(Double, Boolean, Action<NSTimer>)
CreateTimer(Double, NSObject, Selector, NSObject, Boolean)

後で NSRunLoop に追加できるタイマー オブジェクトを作成します。

CreateTimer(Double, Action<NSTimer>)

public static Foundation.NSTimer CreateTimer (double seconds, Action<Foundation.NSTimer> action);
static member CreateTimer : double * Action<Foundation.NSTimer> -> Foundation.NSTimer

パラメーター

seconds
Double
action
Action<NSTimer>

戻り値

適用対象

CreateTimer(TimeSpan, Action<NSTimer>)

public static Foundation.NSTimer CreateTimer (TimeSpan when, Action<Foundation.NSTimer> action);
static member CreateTimer : TimeSpan * Action<Foundation.NSTimer> -> Foundation.NSTimer

パラメーター

when
TimeSpan
action
Action<NSTimer>

戻り値

適用対象

CreateTimer(Double, Boolean, Action<NSTimer>)

[Foundation.Export("timerWithTimeInterval:repeats:block:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 3, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 12, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static Foundation.NSTimer CreateTimer (double interval, bool repeats, Action<Foundation.NSTimer> block);
static member CreateTimer : double * bool * Action<Foundation.NSTimer> -> Foundation.NSTimer

パラメーター

interval
Double
repeats
Boolean
block
Action<NSTimer>

戻り値

属性

適用対象

CreateTimer(Double, NSObject, Selector, NSObject, Boolean)

後で NSRunLoop に追加できるタイマー オブジェクトを作成します。

[Foundation.Export("timerWithTimeInterval:target:selector:userInfo:repeats:")]
public static Foundation.NSTimer CreateTimer (double seconds, Foundation.NSObject target, ObjCRuntime.Selector selector, Foundation.NSObject userInfo, bool repeats);
static member CreateTimer : double * Foundation.NSObject * ObjCRuntime.Selector * Foundation.NSObject * bool -> Foundation.NSTimer

パラメーター

seconds
Double

タイマーを起動するまでの秒数。

target
NSObject

タイマーの起動時に呼び出されるオブジェクト。

selector
Selector

target呼び出される メソッド。

userInfo
NSObject

カスタム ユーザー情報。

このパラメーターは、null に設定できます。

repeats
Boolean

このタイマーを自動的に繰り返す必要があるかどうか (true) か、最初に発生した後に無効になります (false)。

戻り値

属性

適用対象