I use the NSTimer in robovm , but it not work, I don't know why? here is my code:
mTimer = NSTimer.create(1, new VoidBlock1<NSTimer>() {
@Override
public void invoke(NSTimer a) {
onUpdate();
System.out.println("onUpdate");
}
}, true);
But not happen.
other way:
mTimer = NSTimer.create(1, this, Selector.register("onUpdate"), null, true);
@Method(selector = "onUpdate")
public void onUpdate(){
System.out.println("onUpdate");
}
nothing happen too. and other way is also not work
mTimer = NSTimer.create(1, this, Selector.register("onUpdate:"), null, true);
@Callback @BindSelector("onUpdate:")
public void onUpdate(Selector cmd){
System.out.println("onUpdate");
}
it also not work . please help me .