开发者

How to unselect an object from a UITableView?

开发者 https://www.devze.com 2023-03-05 06:46 出处:网络
I was wondering how I could unselect an object from my UITableView. One of the cells is highlighted, or selected, and I want to unselect it so that none of the UITableView cells are se开发者_运维技巧l

I was wondering how I could unselect an object from my UITableView. One of the cells is highlighted, or selected, and I want to unselect it so that none of the UITableView cells are se开发者_运维技巧lected. How could I do this?


You can do this:

[yourTableView deselectRowAtIndexPath:[yourTableView indexPathForSelectedRow] animated:NO];


If you gain a reference to the cell, you can also call

cell.selected = NO;
0

精彩评论

暂无评论...
验证码 换一张
取 消