老大威武,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];

}

posted @ 2014-08-26 08:58  路在脚下,  阅读(209)  评论(0编辑  收藏  举报