NSTimer.CreateTimer Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
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>)
CreateTimer(TimeSpan, 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
Parametri
- interval
- Double
- repeats
- Boolean
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
.
- repeats
- Boolean
Se questo timer deve essere ripetuto automaticamente (true) o verrà invalidato dopo aver attivato la prima volta (false).
Restituisce
- Attributi