开发者

How can I make only one UITableView cell can be highlighted when selected?

开发者 https://www.devze.com 2023-02-17 03:46 出处:网络
I want to make only one cell to be highlighted when it\'开发者_开发问答s selected. I can\'t use UITableViewCellSelectionStyleNone because I want other cells to be selectable and can be highlighted in

I want to make only one cell to be highlighted when it'开发者_开发问答s selected.

I can't use UITableViewCellSelectionStyleNone because I want other cells to be selectable and can be highlighted in edit mode.

Every comment will be appreciated.

Thanks


I figured out how to do this

Just use next two lines in viewDidLoad and made last cell has very big (enough to cover entire cell) UIButton.

self.tableView.allowsSelection = NO;
self.tableView.allowsSelectionDuringEditing = YES;
0

精彩评论

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