• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem with UIPanGestureRecognizer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with UIPanGestureRecognizer


  • Subject: Re: Problem with UIPanGestureRecognizer
  • From: Kyle Sluder <email@hidden>
  • Date: Mon, 27 Jun 2016 10:01:21 -0500

On Sun, Jun 26, 2016, at 02:01 PM, William Squires wrote:
>   I've got a simple project whose view controller has both a
>   UITapGestureRecognizer and a UIPanGestureRecognizer.
>   Both show up in the outline view (and their proxies(?) show up at the
>   top of the view controller representation, along with the proxies for
>   the view controller, the first responder, and "exit" (unwind segue?). I
>   can confirm these are connected to my view controller (in swift, the
>   dot-in-circle doohicky shows up to the left of the IBAction func
>   grabDrop(sender: UIPanGestureRecognizer), and right-clicking on the
>   proxy shows me the action connection to my view controller is in fact
>   connected to grabDrop:, but... <drum roll, please>... a
>   print("grabDrop:") right after the opening curly brace for the func
>   never fires. How can I debug this? There's nothing to put a breakpoint
>   on, since the code never fires, and one can't put a breakpoint on a
>   storyboard. Help!!

Select the gesture recognizer and switch to the Connections inspector.
What’s listed next to “gestureRecognizers” in the “referencing outlet
connections” section? There should be exactly one view named there.

>
> i.e.
>
> (*) IBAction func grabDrop(sender: UIPanGestureRecognizer)
> {
> print("grabDrop:") // <- never gets here!!
> ...
> }

Just for the record, have you upgraded your project to Swift 3 yet? If
so, this function declaration should probably be styled `@IBAction func
grabDrop(_ sender:)`.

--Kyle Sluder

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Problem with UIPanGestureRecognizer (From: William Squires <email@hidden>)

  • Prev by Date: Problem with UIPanGestureRecognizer
  • Next by Date: Re: iOS Xcode 7.3. If I'm telling it to build for 8.0, why is it reporting that it's built for 8.3
  • Previous by thread: Problem with UIPanGestureRecognizer
  • Next by thread: I'll write this up as a bug, BUUUT…
  • Index(es):
    • Date
    • Thread