zoukankan      html  css  js  c++  java
  • 【iOS】那些年,遇到的小坑

    'NSInvalidArgumentException', reason: '-[__NSPlaceholderDictionary initWithObjectsAndKeys:]: second object of each pair must be non-nil.  Or, did you forget to nil-terminate your parameter list?'

    解决方法:[[NSDictionary allocinitWithObjectsAndKeys  每个key和value都不能为nil,最后要加一个nil,另外数值类型的要加 @符号转换成对象

    TabBarController 跳到子Controller时候,隐藏tabbar属性

    解决方法:

    ViewController *controller = [ViewController new];
    controller.hidesBottomBarWhenPushed = YES;//隐藏bottomBar
    [self.navigationController pushViewController:controller animated:YES];

    UITableView add到某个添加了手势的View上,手势阻挡点击Cell事件的问题。解决方案:

    -(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
    {
        // 若为UITableViewCellContentView(即点击了tableViewCell),则不截获Touch事件
        if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
            return NO;
        }
        return  YES;
    }
  • 相关阅读:
    python处理excel文件
    Python datetime模块
    OrderedDict 有序字典以及读取json串时如何保持原有顺序
    ansible 学习笔记
    nginx的location和rewrite
    实体机重装系统
    热词
    教育
    生活
    1、两数之和
  • 原文地址:https://www.cnblogs.com/panzi/p/5201111.html
Copyright © 2011-2022 走看看