NSTimer.CreateTimer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateTimer(Double, Action<NSTimer>) | |
CreateTimer(TimeSpan, Action<NSTimer>) | |
CreateTimer(Double, Boolean, Action<NSTimer>) | |
CreateTimer(Double, NSObject, Selector, NSObject, Boolean) |
Creates a timer object that can be later added to an 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
Parameters
- interval
- Double
- repeats
- Boolean
Returns
- Attributes
Applies to
CreateTimer(Double, NSObject, Selector, NSObject, Boolean)
Creates a timer object that can be later added to an 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
Parameters
- seconds
- Double
The number of seconds between firings of the timer.
- target
- NSObject
An object that will be invoked when the timer fires.
- selector
- Selector
The method that will be invoked on target
.
- repeats
- Boolean
Whether this timer should repeat automatically (true) or will be invalidated after firing the first time (false).
Returns
- Attributes