ios - UIButton doesn't work in UIScrollview -


i have uiscrollview , view. in view have uibutton doesn't work, if have uibutton in uiscrollview works. have user interaction enabled on both.

enter image description here

for button have method:

- (ibaction)search {     nslog(@"search"); } 

enter image description here

whatever give view doesn't work.

i solve problem. view not configured (constraints in autolayout)

try

- (bool)touchesshouldcancelincontentview:(uiview *)view   {        return ![view iskindofclass:[uibutton class]];   } 

hope helps.


Comments