NSTimer.CreateScheduledTimer Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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
Retours
- Attributs