I applied a vertical slider in one of my applications, which is expanding UISlider
. when the scrolling is completed / completed, I send commands to the server with the values of the slider. Sometimes, when I scroll quickly up / down and release, the slider values become inconsistent before sending the command and after sending the command.
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
NSLog(@"Value of Slider before sending command=%f",self.value);
[self sendCommand];
[super touchesEnded:touches withEvent:event];
NSLog(@"Slider value after sending command=%f",self.value);
}
But if I put a super challenge before sending a team, then everything will be fine. Please explain if anyone knows why this is happening.
[super touchesEnded:touches withEvent:event]
A more interesting fact: if I do not call super, then everything works well.
Rahul source
share