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没有颜色了。。你没试? 

  • 相关阅读:
    类的组合
    类的派生
    类的继承
    对象的高度整合
    类和数据类型
    对象的绑定方法
    对象属性查找顺序
    C++中struct和class的区别 [转]
    curl_setopt函数相关应用及介绍(转)
    linux 下如何查看和踢除正在登陆的其它用户 ==>Linux下用于查看系统当前登录用户信息的4种方法
  • 原文地址:https://www.cnblogs.com/worldtraveler/p/4565782.html
Copyright © 2011-2022 走看看