如果用下面第1行的写法,调用
[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(removeFromSuperview) object:nil];
可以生效
如果用下面第3行的写法,调用
[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(removeFromSuperview) object:nil];
不能够取消 removeFromSuperview 这个方法
1 [self performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:TIPSDISAPPEARTIME];
2
3 [self performSelector:@selector(removeFromSuperview) withObject:self afterDelay:TIPSDISAPPEARTIME];
一个延时调用问题,码迷,mamicode.com
时间: 2024-09-30 04:13:39