zoukankan      html  css  js  c++  java
  • Storyboard跳转传值

    1、 Storyboard 模态(或Pop)指定控制器

    UIStoryboard *sb_board = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    LoginController *vc_login = [sb_board instantiateViewControllerWithIdentifier:@"LoginController"];
    [self  presentViewController:vc_login animated:YES completion:nil];
    

    2、 Storyboard Pop回指定控制器

    UIStoryboard *sb_board = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    CateWebController *vc_cate_web = [sb_board instantiateViewControllerWithIdentifier:@"CateWebController"];
    for (UIViewController* vc in self.navigationController.viewControllers) {
      if ([vc isKindOfClass:[vc_cate_web class]]) {
        [self.navigationController popToViewController:vc animated:YES];
      }
    }
    

     3、Storyboard(相连接)直接跳转

     self.hidesBottomBarWhenPushed = YES;
    [self performSegueWithIdentifier:Identifier sender:self];
    self.hidesBottomBarWhenPushed = YES;
    

      4、Storyboard(相连接)传值

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
        // Get the new view controller using [segue destinationViewController].
        // Pass the selected object to the new view controller.
        if ([segue.identifier isEqualToString:@"SegueDetail"])
        {
             DetailController *Detail = segue.destinationViewController;
             Detail.strUrl = [NSString stringWithFormat:@"%@",self.str_url];
    
        }
    }
    

     A-B-C   C-A

    http://www.jianshu.com/p/c4d1eb226eaf

    
    
  • 相关阅读:
    理解SetCapture、ReleaseCapture、GetCapture(控制了消息发往哪个窗口,是理解消息的关键)
    Javascript 的addEventListener()及attachEvent()区别分析
    鼠标拖拽
    鼠标右键菜单
    keydown
    一串跟随鼠标的DIV
    event对象和事件冒泡
    发表说说
    文档流
    CSS3 @keyframes 规则
  • 原文地址:https://www.cnblogs.com/superbobo/p/5284513.html
Copyright © 2011-2022 走看看