Swift NSTimer is crashing my program with EXC_BAD_ACCESS -
ios noob here - trying run background timer in swift. below code generates error message: thread 1: exc_bad_access (code=1, address=0xd)
it has userinfo , i've tried using nil no success.
@ibaction func startbutton(_ sender: anyobject) { timer = timer.scheduledtimer ( timeinterval: 0.01, target: any.self, selector: #selector(viewcontroller.whilerunning), userinfo: any?.self, repeats: true ) } reading following documentation not helpful:
https://developer.apple.com/reference/foundation/timer/1412416-scheduledtimer#discussion
the whole point of move element around storyboard on time using x coordinates.
Comments
Post a Comment