天天看點

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[.....報錯的問題

項目每次運作,都會出現崩潰,

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSTimer scheduledTimerWithTimeInterval:repeats:block:]: unrecognized selector sent to class 0x1a0e0dd10' 

原因:

+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)interval repeats:(BOOL)repeats block:(void (^)(NSTimer *timer))block API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));

這個方法是iOS10.0以後的系統才使用。