iOS 搜索框自动搜索时间间隔设置

 [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(searchDataNetWork) object:nil];
    
     [self performSelector:@selector(searchDataNetWork) withObject:nil afterDelay:0.5];

searchDataNetWork 就是网络请求的方法

你可能感兴趣的:(iOS 搜索框自动搜索时间间隔设置)