- (void)performSelector:(SEL)aSelector withObject:(nullable id)anArgument afterDelay:(NSTimeInterval)delay inModes:(NSArray<NSRunLoopMode> *)modes;
- (void)performSelector:(SEL)aSelector withObject:(nullable id)anArgument afterDelay:(NSTimeInterval)delay
performSelector N秒鐘之后 執(zhí)行方法
- (void)cancelPreviousPerformRequestsWithTarget:(id)aTarget selector:(SEL)aSelector object:(nullable id)anArgument;
- (void)cancelPreviousPerformRequestsWithTarget:(id)aTarget
cancelPreviousPerformRequestsWithTarget:取消performSelector方法注冊(cè)過的方法,就是說當(dāng)上面這個(gè)方法正在運(yùn)行,比如希望5秒鐘之后執(zhí)行某一個(gè)方法超凳,但是沒到5秒鐘的情況下取消performSelector锅睛,就是用cancelPreviousPerformRequestsWithTarget方法來實(shí)現(xiàn)的