gpt4 book ai didi

iphone - 我想使所有 [self performSelector :@selector(showLyrics) withObject:nil afterDelay:2];

转载 作者:行者123 更新时间:2023-11-28 18:39:30 25 4
gpt4 key购买 nike

我正在添加

[self performSelector:@selector(showLyrics) withObject:nil afterDelay:20];

但如果用户重新启动歌曲,则不应执行此选择器。所以我只想知道我怎样才能取消它。因为 20 秒后它会被调用,但我不想那样,并重新安排

 [self performSelector:@selector(showLyrics) withObject:nil afterDelay:20];

我有很多

[self performSelector:@selector(showLyrics) withObject:nil afterDelay:2];

我想取消我之前安排的所有这些。

最佳答案

[[NSRunLoop currentRunLoop] cancelPerformSelector:@selector(showLyrics) 
target:self
argument:nil];

关于iphone - 我想使所有 [self performSelector :@selector(showLyrics) withObject:nil afterDelay:2];,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13174306/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com