//設定5秒后執(zhí)行disconnect方法
[self performSelector:@selector(disconnect:) withObject:nil afterDelay:5];
//取消disconnect的延時執(zhí)行
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(disconnect:) object:nil];
//設定5秒后執(zhí)行disconnect方法
[self performSelector:@selector(disconnect:) withObject:nil afterDelay:5];
//取消disconnect的延時執(zhí)行
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(disconnect:) object:nil];