1
votes

I have a UIScrollView that contains a UIView that also contains a row of UIButtons. I have noticed recently that when the user goes to scroll left and right by touching the UIScrollView, there is an instant delay. Also sometimes a swipe is detected by the UIButton and seems to activate the button.

- (void)setupScreen {

     CGRect screenRect = [[UIScreen mainScreen] bounds];
     CGFloat screenWidth = screenRect.size.width;
     CGFloat screenHeight = screenRect.size.height;
     [self.view setFrame:CGRectMake(0, 0, screenWidth, screenHeight)];

     [self.view addSubview:self.scrollViewControls];
     [self.scrollViewControls setFrame:CGRectMake(0, self.view.frame.size.height - self.scrollViewControls.frame.size.height, self.view.frame.size.width, self.scrollViewControls.frame.size.height)];
     [self.scrollViewControls addSubview:self.viewControls];
     [self.scrollViewControls setContentSize:CGSizeMake(self.viewControls.frame.size.width, self.viewControls.frame.size.height)];
     [self.scrollViewControls setBackgroundColor:[self colorWithHexString:@"333a44"]];
     self.scrollViewControls.delaysContentTouches = NO;

     self.imageCache = [[NSMutableDictionary alloc] init];

     [self setupImage];

}

I hadn't noticed this issue in iOS 7 and it seems to be in iOS 8. All the buttons are set to Touch Inside when pressed.

Any idea how to correct this?

2

2 Answers

1
votes

scrollView.delaysContentTouches = NO

0
votes

After searching this is the best solution for my Scroll Issue.

See Answer