zoukankan      html  css  js  c++  java
  • UITableView去掉分隔符

    或用代码实现

    [TableView setSeparatorColor:[UIColor clearColor]]; 

    问题一用你给的方法貌似不行,我用这个方法把分隔线给“去掉”了:
        [editViewController.tableView setBackgroundColor:[UIColor clearColor]];
        [editViewController.tableView setSeparatorColor:[UIColor clearColor]];

    问题一,用上面的方法是最好不过了。为什么不行呢。是因为。。。你的TableView没有设为透明。。。

    [editViewController.tableView setBackgroundColor:[UIColor clearColor]];这个也 是关键。。呵,,忽略掉了。不好意思。。

    用setSeparatorstyle吧,,, 

    tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

    separatorStyle还可以设为其他值:

    typedef enum {
    UITableViewCellSeparatorStyleNone,
    UITableViewCellSeparatorStyleSingleLine,
    UITableViewCellSeparatorStyleSingleLineEtched   // This separator style is only supported for grouped style table views currently
    } UITableViewCellSeparatorStyle; 

    在didSelectRowAtIndexPath不要执行该cell任何事件, 这样只是不做事件的处理,但是cell的颜色还是会因为touch事件而改变这样用户的体验就不会太好!
    我现在就是想实现一个类似iPhone短信里面添加收件人的那种界面?
    如果要实现那种效果,用talbview到底行不行?




    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    这个就是touch没有颜色了。。你没试? 

  • 相关阅读:
    cookie小结
    WEB服务器,TOMCAT和servlet之间的关系
    HTTP协议基础总结
    servlet总结
    注解总结
    常使用的String方法
    变量&&常量
    标识符&&注释&&关键字
    配置环境变量&&OpenJDK和OracleJDK区别
    逆向工程__Generate插件安装 && xml配置文件解析 &&使用反向生成代码 && 接口说明
  • 原文地址:https://www.cnblogs.com/worldtraveler/p/4565782.html
Copyright © 2011-2022 走看看