public class NSTimer extends NSObject
Constructor and Description |
---|
NSTimer(NSDate date,
double interval,
boolean repeats,
org.robovm.objc.block.VoidBlock1<NSTimer> block) |
NSTimer(NSDate date,
double ti,
NSTimerDelegate target,
Object ui,
boolean rep) |
Modifier and Type | Method and Description |
---|---|
void |
fire()
Triggers this timer.
|
NSDate |
fireDate()
Returns the date at which this timer fires.
|
void |
invalidate()
Cancels this timer permanently.
|
boolean |
isValid()
Returns a Boolean that shows whether the timer is currently active.
|
static NSTimer |
scheduledTimerWithTimeInterval(double seconds,
NSTimerDelegate target,
Object userinfo,
boolean repeats)
Constructs and returns a new timer with the specified parameter values.
|
void |
setFireDate(NSDate date)
Sets the date at which this timer fires.
|
double |
timeInterval()
Returns the time interval of the timer.
|
static NSTimer |
timerWithTimeInterval(double seconds,
NSTimerDelegate target,
Object userinfo,
boolean repeats)
Constructs and returns a new timer with the specified parameter values
and schedules it on the current run loop.
|
Object |
userInfo()
Returns the user information of the timer.
|
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public NSTimer(NSDate date, double interval, boolean repeats, org.robovm.objc.block.VoidBlock1<NSTimer> block)
public NSTimer(NSDate date, double ti, NSTimerDelegate target, Object ui, boolean rep)
public static NSTimer timerWithTimeInterval(double seconds, NSTimerDelegate target, Object userinfo, boolean repeats)
seconds
- The seconds between repetitions.target
- The delegate object that is related to this timer.userinfo
- User information incorporated into this timer.repeats
- TRUE then the timer triggering is repeated.public static NSTimer scheduledTimerWithTimeInterval(double seconds, NSTimerDelegate target, Object userinfo, boolean repeats)
seconds
- The seconds between repetitions.target
- The delegate object that is related to this timer.userinfo
- User information incorporated into this timer.repeats
- TRUE then the timer triggering is repeated.public boolean isValid()
public NSDate fireDate()
public void setFireDate(NSDate date)
date
- The date at which this timer fires.public double timeInterval()
public Object userInfo()
public void invalidate()
public void fire()
Copyright © 2020. All rights reserved.