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

  • 相关阅读:
    SpringBoot启动流程
    谈谈Java的线程池设计
    ReentrantReadWriteLock及共享锁的实现
    Condition的await()和signal()流程
    AbstractQueuedSynchronizer与ReentrantLock
    线程状态及各状态下与锁和CPU的关系
    Java运算符和表达式
    Java常量与变量
    jtl文件解析(jmeter+jenkins+python实现接口自动化)
    mac 增加/usr/bin目录的操作无权限
  • 原文地址:https://www.cnblogs.com/leiming1001/p/5262880.html
Copyright © 2011-2022 走看看