Condividi tramite


NSTimer.CreateScheduledTimer Metodo

Definizione

Overload

CreateScheduledTimer(Double, NSObject, Selector, NSObject, Boolean)

Crea un timer con i parametri specificati e lo pianifica per l'esecuzione nell'NSRunLoop corrente nella modalità predefinita.

CreateScheduledTimer(Double, Boolean, Action<NSTimer>)
CreateScheduledTimer(Double, Action<NSTimer>)
CreateScheduledTimer(TimeSpan, Action<NSTimer>)

CreateScheduledTimer(Double, NSObject, Selector, NSObject, Boolean)

Crea un timer con i parametri specificati e lo pianifica per l'esecuzione nell'NSRunLoop corrente nella modalità predefinita.

[Foundation.Export("scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:")]
public static Foundation.NSTimer CreateScheduledTimer (double seconds, Foundation.NSObject target, ObjCRuntime.Selector selector, Foundation.NSObject userInfo, bool repeats);
static member CreateScheduledTimer : 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 da richiamare su target.

userInfo
NSObject

Informazioni utente personalizzate per il timer.

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

CreateScheduledTimer(Double, Boolean, Action<NSTimer>)

[Foundation.Export("scheduledTimerWithTimeInterval: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 CreateScheduledTimer (double interval, bool repeats, Action<Foundation.NSTimer> block);
static member CreateScheduledTimer : double * bool * Action<Foundation.NSTimer> -> Foundation.NSTimer

Parametri

interval
Double
repeats
Boolean
block
Action<NSTimer>

Restituisce

Attributi

Si applica a

CreateScheduledTimer(Double, Action<NSTimer>)

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

Parametri

seconds
Double
action
Action<NSTimer>

Restituisce

Si applica a

CreateScheduledTimer(TimeSpan, Action<NSTimer>)

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

Parametri

when
TimeSpan
action
Action<NSTimer>

Restituisce

Si applica a