Compartilhar via


NSTimer.CreateTimer Método

Definição

Sobrecargas

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

Cria um objeto de temporizador que pode ser adicionado posteriormente a um 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>

Retornos

Aplica-se 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>

Retornos

Aplica-se 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>

Retornos

Atributos

Aplica-se a

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

Cria um objeto de temporizador que pode ser adicionado posteriormente a um 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

O número de segundos entre disparos do temporizador.

target
NSObject

Um objeto que será invocado quando o temporizador for acionado.

selector
Selector

O método que será invocado em target.

userInfo
NSObject

Informações personalizadas do usuário.

Esse parâmetro pode ser null.

repeats
Boolean

Se esse temporizador deve ser repetido automaticamente (true) ou será invalidado depois de disparar pela primeira vez (false).

Retornos

Atributos

Aplica-se a