I use custom cells of subclassing UITableViewCell in a table view. And There must be space between cells. I succesfully add the space with adding a subview that I called SpaceView into the content view. But When I touched the spaceView, it is perceived as I touched the cell. And didSelectRow method called. I tried to set spaceView's UserInteractionEnabled==NO. But It doesn't work.
So my question is; Is this the right way I used to add space between cells ? Should I try to add cells for making the space ? or If its the right way, How can I prevent calling "didSelectRowAtIndexPath" method when I touched spaceView ?
Make your
spaceViewasUIButton(I guess it'sUIViewright now)When you add
UIButtonthat touch will be consumed by the button thus touch won't be passed to it's parent.OR
I'm not sure if it will work or not, you can add tap gesture to your
spaceView