Compartir a través de


NSTimer.CreateTimer Método

Definición

Sobrecargas

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

Crea un objeto de temporizador que se puede agregar más adelante 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

Parámetros

seconds
Double
action
Action<NSTimer>

Devoluciones

Se aplica 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

Parámetros

when
TimeSpan
action
Action<NSTimer>

Devoluciones

Se aplica 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

Parámetros

interval
Double
repeats
Boolean
block
Action<NSTimer>

Devoluciones

Atributos

Se aplica a

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

Crea un objeto de temporizador que se puede agregar más adelante 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

Parámetros

seconds
Double

Número de segundos entre los disparos del temporizador.

target
NSObject

Objeto que se invocará cuando se active el temporizador.

selector
Selector

Método que se invocará en target.

userInfo
NSObject

Información de usuario personalizada.

Este parámetro puede ser null.

repeats
Boolean

Si este temporizador debe repetirse automáticamente (true) o se invalidará después de activar la primera vez (false).

Devoluciones

Atributos

Se aplica a