UIscrollView swipe gesture + UIButton finger down effect on iOS -



UIscrollView swipe gesture + UIButton finger down effect on iOS -

i'm trying come uiscrollview in paging mode, each page shows image of product and, besides beingness able swipe between pages, i'd product image switch "down" version of when specific product/page tapped.

so far tried following:

1 - adding uibuttons pages of scrollview: obviously, way can have images switch "selected" version on finger down, buttons, taking whole page, prevent scrollview detecting swipe gesture.

2 - adding uiviews instead of buttons, , uitapgesturerecognizer: way can tap image select product , recognizer lets gesture pass on scrollview, allowing swiping too. problem approach can't switch images "selected" versions when user touches them, since tap recognizer reports uigesturerecognizerstateended.

any ideas how both button up/down , scrollview swipe behaviors?

scrap (well not everything, gist). no gesture recognizers no nothing. had problem too, having mounted uiview on uiscrollview needed have interactive elements in it. solution, uiview's friggin awesome property called exclusivetouch. exclusive touch takes of events scrollview, , ignores them if event within uiview, passes them straight view. , because uibutton inherits uiview, need self.button.exclusivetouch = yes

pretty cool, huh!?

ios uiscrollview uibutton uigesturerecognizer

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -