开发者

Using a UIButton as an Accessory View for a UITableCell

I have run into an interesting bug where it appears that when you select a UITableCell it changes all of it's subviews to their highlighed state. This includes my accessoryView which is a UIButton which obviously I only want highlighted when the user presses like a normal button.

I have a friend who went as far subclassing UIButton to override this in his app and manually managed t开发者_运维问答he state for this type of behavior but that seems drastic to get what should be the expected behavior. So, I am wondering what other solutions people have come up with for this problem.

Has anyone else had this issue? If so, what did you do to work around it? Any code samples as well as ideas are very welcome!


I ended going with a custom button on this like Jesse Recommended abd set both the highlighed and normal state to the same image. It seemed to work well enough for what I was trying to do. Thanks again!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜