Sunday 15 January 2012

ios - UIScrollView not scrolling when touching some elements -



ios - UIScrollView not scrolling when touching some elements -

i have uiscrollview autolayout on, , several elements on it. problem when seek scroll touching on elements nil happens, when seek scroll touching on other elements scrolling works perfectly.

the uiscrollview has several uiviews uitextfields , uibuttons inside.

it seems touch events, or scrolling events, not beingness sent parent uiscrollview, views.

any thoughts?

uiscrollview has method -(bool)touchesshouldcancelincontentview:(uiview *)view default returns yes if view not uicontrol object; otherwise, returns no. if want enable scrolling when touching uicontrol objects should subclass uiscrollview , override touchesshouldcancelincontentview: homecoming yes:

@interface myscrollview : uiscrollview @end @implementation myscrollview - (bool)touchesshouldcancelincontentview:(uiview *)view { homecoming yes; } @end

ios objective-c uiscrollview scroll

No comments:

Post a Comment