最近更新
阅读排行
关注本站

Swift如何取消tableviewcell高亮

阅读:7252 次   编辑日期:2016-03-28

目录:

概述:

在制作APP的过程中,使用 tableviewcell 是经常的事,让选中的cell高亮也是经常的事,那么如何让 tableviewcell取消高亮呢?今天我们来说说。

Swift tableviewcell 取消高亮:

func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath){
    tableView.deselectRowAtIndexPath(indexPath, animated: true)//点击完成,取消高亮
}
在 tableView 这个方法里面添加上面这行代码就搞定~
将本篇文章分享到:
top