iOS延迟时间再执行某个事件

方法一:

[self performSelector:@selector(popEvent) withObject:nil afterDelay:0.5];

//[menuView mainMenuReload];



方法二:

 dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, 2.0*NSEC_PER_SEC);

                dispatch_after(delayTime, dispatch_get_main_queue(), ^{

//                    [self.navigationController popToRootViewControllerAnimated:YES];

                });


你可能感兴趣的:(IOS)