This is a simple problem, but a difficult task.
I have two buttons that perform the same function.
I set different touch events for the buttons. Although this helps, you can still click them at the same time. With a slow connection, it will be even easier.
[vote1Btn addTarget:self action:@selector(voteUp:) forControlEvents:UIControlEventTouchUpInside];
[vote2Btn addTarget:self action:@selector(voteUp:) forControlEvents:UIControlEventTouchDown];
source
share