objective c - How to move background using swipe gesture -


i beginner programmer making game appstore on xcode's sprite kit. game takes place on background wider screen (the height of map equal height of screen width of map larger of screen), , want user view other parts of map swiping. until have used touchesbegin,touchesmoved , touchesend methods reposition background map, wanted give shot @ using uiswipegesturerecognizer. have implemented basics of this, when use follows:

- (void)handleswipe:(uiswipegesturerecognizer *)swipe ... cgpoint touchlocation = [swipe locationinview:swipe.view];  touchlocation = [self convertpointfromview:touchlocation]; nslog(@"point %f,%f", touchlocation.x,touchlocation.y); ... 

it take in initial point began swipe , regardless add "cgpoint touchlocationend" in method, gives me same position (the initial point).

what accomplish have background map move move pointer 1 location second location (that is, point on background map first click dragged new position on viewable screen). how can accomplish using uiswipegesturerecgonizer? i'll happy go more in depth if isn't clear

you use pan gesture instead of swipe gesture move background


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -