I have this custom element in an UITableViewCell and it is made from an image with 4 buttons over it. https://i.stack.imgur.com/e1CVK.jpg
Right now I am handling the selection with the TouchUpInside action on the button, but I want the user to be able to slide over it with a touch so it feels like you pickup the "slider" and then move it from ++ to - for example.
This means that I want to catch what button the user is currently sliding over to give that UIButton the selected state.
I've tried using the touchBegan method from: How to create buttons which are activated when the user slides their finger over them on iPhone. But UITouch always seems to be nil.
Am I doing it wrong or am I forgetting something?
Do you guys have any tips on how to implement this behaviour?
Thanks in advance!
Edit:
I ended up using a pan, tap and longpress -gesture recognizer.
Along with touchesbegan and touches ended.
This works really well and I do recommend it to everyone who is struggling with a similar issue!