Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
- import UIKit
- class ViewController: UIViewController {
- var t = Timer()
- @IBAction func hi(_ sender: Any) {
- print("Camera button pressed")
- t.invalidate()
- }
- func processTimer() {
- print("1 second has passed")
- }
- override func viewDidLoad() {
- super.viewDidLoad()
- t = Timer.scheduledTimer(timeInterval: 1, target: self, selector: Selector(("processTimer")), userInfo: nil, repeats: true)
- // Do any additional setup after loading the view, typically from a nib.
- }
- override func didReceiveMemoryWarning() {
- super.didReceiveMemoryWarning()
- // Dispose of any resources that can be recreated.
- }
Add Comment
Please, Sign In to add comment