zoukankan      html  css  js  c++  java
  • tableviewCell实用小技术

     

    1、 隐藏tableViewCell的分割线:

    tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    2、实现右侧的小灰色箭头 只要将cell的accessoryType属性设置为

    cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;

    //关闭tableView顶部的cell冒出来的白色空隙
    self.automaticallyAdjustsScrollViewInsets = NO
    //关闭tableView选中的动画
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
     开启手势返回
     self.navigationController.interactivePopGestureRecognizer.delegate = (id)self;

    其他格式:像对勾、删除什么类似,更改一下属性值即可

    3、 用UiButton制作圆形头像时,去除头像多余的部分
    button.clipsToBounds = YES;
    4、毛玻璃效果(ios8.0以后的版本)
    UIVisualEffectView *visualEffectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
        visualEffectView.frame = CGRectMake(0, 0, 320*[FlexibleFrame ratio], 180*[FlexibleFrame ratio]);
        visualEffectView.alpha = 1.0;
    5、关闭textField、textView 相关
    //是否自动纠错功能
      text.autocorrectionType = UITextAutocorrectionTypeNo;
    typedef enum {
        UITextAutocorrectionTypeDefault, 默认
        UITextAutocorrectionTypeNo,  不自动纠错
        UITextAutocorrectionTypeYes, 自动纠错
    } UITextAutocorrectionType;
    6、每输入一个字符就变成点 用语密码输入
     text.secureTextEntry = YES;
    7、pod更新慢

    CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动 原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少。加参数的命令如下:

    pod install --verbose --no-repo-update
    
    pod update --verbose --no-repo-update
    8、查看代码行数

    find . -name ".m" -or -name ".h" -or -name ".xib" -or -name ".c" |xargs wc -l  1

  • 相关阅读:
    前端异常上报
    前端异常解析:Source Map
    前端操作剪切板不完全指北
    多系统之间模块相互引用的引发的深思
    浅谈vue原理(四)
    浅谈vue原理(三)
    浅谈vue原理(二)
    浅谈vue原理(一)
    vue中路由嵌套的作用
    常用的学习网站和小工具
  • 原文地址:https://www.cnblogs.com/leiming1001/p/5262880.html
Copyright © 2011-2022 走看看