zoukankan      html  css  js  c++  java
  • TableView,自定义TableViewCell

     自定义Table

    原理:

    http://blog.jobbole.com/67272/

    http://www.cnblogs.com/wangxiaofeinin/p/3532831.html

    补充:

    1,两个tableview ,写了函数 commitEditingStyle 其中一个tableview 怎样让它不出现delete按钮?   

      在canEditRowAtIndexPath函数中 将不需要出现delete的tableview的 return  NO;

    2,TableViewCell自定义分割线

    实现如下: 
    UITableView中将分割线样式改为None 

    tableView.separatorStyle = UITableViewCellSeparatorStyleNone;  

    自定义UITableViewCell中复写- (void)drawRect:(CGRect)rect方法 

    - (void)drawRect:(CGRect)rect
    {
        CGContextRef context = UIGraphicsGetCurrentContext();
        
        CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);
        CGContextFillRect(context, rect);
        
        //上分割线,
        //    CGContextSetStrokeColorWithColor(context, RGB(0xee,0xef,0xf0).CGColor);
        //    CGContextStrokeRect(context, CGRectMake(72, -1, rect.size.width - 10, 0.5));
        
        //下分割线
        CGContextSetStrokeColorWithColor(context, RGB(0xee,0xef,0xf0).CGColor);
        CGContextStrokeRect(context, CGRectMake(72, rect.size.height, rect.size.width-72, 1));
    }
  • 相关阅读:
    实验一
    BZOJ 2564
    P4557 [JSOI2018]战争
    移动自动化-Mac-IOS-appium环境搭建
    Node安装mac版本
    删除N天前文件和空文件
    Python之jsonpath模块
    性能学习
    参数化
    查找测试用例
  • 原文地址:https://www.cnblogs.com/developer-qin/p/4526068.html
Copyright © 2011-2022 走看看