UIScrollview with UIButtons – how to recreate springboard?

Solution that worked for me included:

  1. Setting canCancelContentTouches in UIScrollView to YES.
  2. Extending UIScrollView to override touchesShouldCancelInContentView:(UIView *)view to return YES when view is a UIButton.

According to documentation touchesShouldCancelInContentView returns “YES to cancel further touch messages to view, NO to have view continue to receive those messages. The default returned value is YES if view is not a UIControl object; otherwise, it returns NO.”

Since UIButton is a UIControl the extension is necessary to get canCancelContentTouches to take effect which enables scrolling.

Leave a Comment