Partager via


NSTimer.CreateScheduledTimer Méthode

Définition

Surcharges

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

Crée un minuteur avec les paramètres spécifiés et le planifie pour l’exécution sur le NSRunLoop actuel en mode par défaut.

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

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

Crée un minuteur avec les paramètres spécifiés et le planifie pour l’exécution sur le NSRunLoop actuel en mode par défaut.

[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

Paramètres

seconds
Double

Nombre de secondes entre les déclenchements du minuteur.

target
NSObject

Objet qui sera appelé lorsque le minuteur se déclenche.

selector
Selector

Méthode à appeler sur target.

userInfo
NSObject

Informations utilisateur personnalisées pour le minuteur.

Ce paramètre peut être null.

repeats
Boolean

Indique si ce minuteur doit se répéter automatiquement (true) ou s’il est invalidé après le premier déclenchement (false).

Retours

Attributs

S’applique à

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

Paramètres

interval
Double
repeats
Boolean
block
Action<NSTimer>

Retours

Attributs

S’applique à

CreateScheduledTimer(Double, Action<NSTimer>)

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

Paramètres

seconds
Double
action
Action<NSTimer>

Retours

S’applique à

CreateScheduledTimer(TimeSpan, Action<NSTimer>)

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

Paramètres

when
TimeSpan
action
Action<NSTimer>

Retours

S’applique à