문제

I have a dynamic table view in iOS 6. The table view cells have the subtitle style and show an image, a title and a subtitle. The table view is inside a navigation controller, and in the navigation bar I have a bar button item which allows you to reset the progress information shown in the subtitle of the cell and in the image shown in the cell (grey image when progress is 0%, orange when bigger than 0%, green when 100%, the actual percentage is shown in the subtitle).

When the user presses the reset button, the image is replaced by a special image (a rounded arrow) which, when pressed, would allow the user to reset the progress and start the exercise from scratch.

The trouble is the image view in a cell is clickable but I cannot distinguish between a click in the image and a click in the text part of the cell (title+subtitle). How can I do this? I'd better subclass and add a button, which is clickable?

Another consideration is that maybe the round arrow that resets should be an accessory view and appear on the right?

도움이 되었습니까?

해결책

I would just use UIButton and add a custom background image. That should work, as you mentioned.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top