naptics / PlainPing

a very plain ping interface in swift
MIT License
58 stars 21 forks source link

Example crashed after press ping button #10

Closed happyfire closed 7 years ago

happyfire commented 7 years ago

Hello, I test the example on a iOS9 device, compiled using xcode 8.3, after press Ping button, app crashed. Please look at the log:

2017-05-04 18:00:24.846 PlainPing_Example[1593:572703] -[PlainPing_Example.ViewController pingButtonPressed:]: unrecognized selector sent to instance 0x1564e6e0 2017-05-04 18:00:24.849 PlainPing_Example[1593:572703] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PlainPing_Example.ViewController pingButtonPressed:]: unrecognized selector sent to instance 0x1564e6e0' First throw call stack: (0x2154f91b 0x20ceae17 0x215552b5 0x21552ee1 0x2147e238 0x25b02755 0x25b026e1 0x25aea6d3 0x25b02005 0x25b01c7f 0x25afa68f 0x25acb125 0x25ac96d3 0x21511dff 0x215119ed 0x2150fd5b 0x2145f229 0x2145f015 0x22a4fac9 0x25b33189 0x44ba8 0x21107873) libc++abi.dylib: terminating with uncaught exception of type NSException

edit: I found it is because of swift 3 compatibility, just fix it by: @IBAction func pingButtonPressed(_ sender: UIButton)