开发者

Custom UITableCellView user interaction

I created a Custom UITableCellView for my application.开发者_如何学Python Each cell has two buttons. The problem I am facing is that the cell itself is selectable which leads to a confused user and poor design. How do I disable the interaction for the cell but keep the interaction enabled for the UIButtons in the cell?

Thanks! Satyam


You can set the cell.selectionStyle = UITableViewCellSelectionStyleNone; and be sure to keep your didSelectRowAtIndexPath unimplemented. That means that your cells will not be interactive, but you can still get messages from your buttons.

Apart from that, of course I don't know what you're trying to achieve, but remember that you can use a UITableViewCellAccessoryDetailDisclosureButton as an accessory view, which is a different "button" from the cell itself. More info here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜