zoukankan      html  css  js  c++  java
  • tabBar隐藏方式

    如果是从A push到B,并且把A的一个东西传到B,那么在push时就要隐藏tabBar,并且要在B ViewController设置一个接收A传到的属性。

    这种方式一般用在表格点选,要把表格点选的内容传到B去。

    A中的代码大概就是这样:

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

        

        Friends *f = self.allFriends[indexPath.row];

        

        chatViewController *chatVC = [[chatViewController alloc] initWithNibName:@"chatViewController" bundle:nil];

        

        chatVC.chatWithFriend = f;

        

        // Push the view controller.

        chatVC.hidesBottomBarWhenPushed = YES;

        [self.navigationController pushViewController:chatVC animated:YES];

    }

     

    而B中用一个属性接收到A传来的值进行处理即可。

  • 相关阅读:
    好元素(good)
    三条线 (Standard IO)
    计数排序-自然顺序Comparable
    贪心算法之田忌赛马
    bzoj3400
    bzoj1704
    CF Round #456 (Div. 2)
    LA3029
    bzoj3000
    bzoj3623
  • 原文地址:https://www.cnblogs.com/endtel/p/4729935.html
Copyright © 2011-2022 走看看