首页 > 代码库 > 老大威武,afterDelay,

老大威武,afterDelay,

当POP,push,dismiss,pressent连续调用的时候,要延迟会使用,

- (IBAction)goShoppingCartButtonAction:(id)sender

{

    [self.navigationController popToRootViewControllerAnimated:NO];

    [self performSelector:@selector(selectThirdTab) withObject:nil afterDelay:.3f];

}

 

- (void)selectThirdTab

{

    MSAppDelegate *appDelegate = (MSAppDelegate *)[[UIApplication sharedApplication] delegate];

    [appDelegate.tabBarController setSelectedIndex:3];

}

老大威武,afterDelay,