UIGestureRecognizer

Home 3 Forums Swift and Sprite Kit UIGestureRecognizer

This topic contains 1 reply, has 2 voices, and was last updated by  CartoonSmart 1 week, 1 day ago.

  • November 11, 2017 at 5:37 pm #175987

    Hi
    I have been trying to add UIGesturerecognizer to my app,I have been experiencing some problems as on Xcode 9
    it keeps telling me UIGestureRecognizer has no member ‘direction’ and this the code. Its specifically referring to this line swipeRightRec.direction = .right

    let swipeRightRec= UIGestureRecognizer()

    swipeRightRec.addTarget(self, action: #selector(GameScene.swipedRight) )
    swipeRightRec.direction = .right
    self.view!.addGestureRecognizer(swipeRightRec)

    func swipeRight()

  • November 12, 2017 at 9:40 pm #176028

    Sure, just change UIGesturerecognizer to UISwipeGestureRecognizer

You must be logged in to reply to this topic.

Download the new CartoonSmart TV App - Organize all your FREE and Premium Lessons

Get it!