Try activating the uiview function if v1 is a uiview with a simple background behind this uislider \
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
if ([touch view] == v1)
{
CGPoint location = [touch locationInView:v1];
NSInteger i = location.x;
}
then get the percentage of xpoint by multiplying it by the v1 frame, if the v1 frame x = 50 and i = 5 means 10 percent, then multiply the percentage value with the value of the slider to change the value of the slider
Nazik source
share