2

I am trying to create a scrollview which will have many views (uiimageviews, uitextfield, etc.) and they are spaced out. The scrolling works but only when you physically touch the uiImages within. I'd like to have it scroll as long as you touch anywhere within the scrollview. I'm sure this is a rookie mistake but if you need code I can post some.

UPDATE It's weird but it seems to work if I set the uiscrollview to have a backgroundColor, but it does not work if its clearColor.

UPDATE 2 Even more strangly if I set [self.view setBackground = [UIColor whiteColor]]` the scrollview works perfectly fine without a background color. Is there some sort of requirement to use a background color?

Does anyone know what's going on?

mkral
  • 4,065
  • 4
  • 28
  • 53

1 Answers1

2

When a view has a clearColor set to it, doesn't respond to touch events. Check one of my recently accepted answers for a solution on another SO Post.

UIView background color affects touches in iOS 5

Community
  • 1
  • 1
skram
  • 5,314
  • 1
  • 22
  • 26
  • Thanks that's a good suggestion. Fortunately I don't plan on using a clearBG, it was just confusing me during testing. Is this intentional from apple? – mkral Jun 14 '12 at 20:49