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;
    }
  • 相关阅读:
    JDK、J2EE、J2SE、J2ME的区别
    消息队列
    Unity3D 导入aar注意事项
    汇编小结
    构造函数语意学--笔记
    androidStudio 改包名
    新手用车
    北京临牌办理与续办
    h5+
    apache.http.MalformedChunkCodingException: Chunked stream ended unexpectedly
  • 原文地址:https://www.cnblogs.com/panzi/p/5201111.html
Copyright © 2011-2022 走看看