一个延时调用问题
时间:2014-04-29 17:21:46
收藏:0
阅读:326
如果用下面第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];
评论(0)