一个延时调用问题

如果用下面第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];

 

posted @ 2014-04-29 17:04  子柱  阅读(124)  评论(0编辑  收藏  举报