Condividi tramite


NSTimer.CreateTimer Metodo

Definizione

Overload

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

Crea un oggetto timer che può essere aggiunto in un secondo momento a un 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

Parametri

seconds
Double
action
Action<NSTimer>

Restituisce

Si applica a

CreateTimer(TimeSpan, Action<NSTimer>)

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

Parametri

when
TimeSpan
action
Action<NSTimer>

Restituisce

Si applica a

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

Parametri

interval
Double
repeats
Boolean
block
Action<NSTimer>

Restituisce

Attributi

Si applica a

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

Crea un oggetto timer che può essere aggiunto in un secondo momento a un 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

Parametri

seconds
Double

Numero di secondi tra la generazione del timer.

target
NSObject

Oggetto che verrà richiamato quando viene attivato il timer.

selector
Selector

Metodo che verrà richiamato su target.

userInfo
NSObject

Informazioni utente personalizzate.

Questo parametro può essere null.

repeats
Boolean

Se questo timer deve essere ripetuto automaticamente (true) o verrà invalidato dopo aver attivato la prima volta (false).

Restituisce

Attributi

Si applica a