• 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: Unable to connect IBOutlet in Swift Xcode 7b2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to connect IBOutlet in Swift Xcode 7b2


  • Subject: Re: Unable to connect IBOutlet in Swift Xcode 7b2
  • From: Charles Srstka <email@hidden>
  • Date: Mon, 06 Jul 2015 19:54:36 -0500

On Jul 6, 2015, at 7:46 PM, Rick Mann <email@hidden> wrote:
>
> I'm having a heck of a time connecting UIViews to my classes. I have a UICollectionViewCell subclass with a bunch of subviews. One of those is custom.
>
> While I can drag from views to the Swift code for the UICollectionViewCell subclass, it keeps trying to connect it to a storyboard in a completely unrelated project in a separate directory. It appears to do the right thing, but at runtime the outlet is nil, and clicking on the little dot by the line of code pops up a menu referencing this other storyboard.*
>
> There's a custom subview in the cell that's also implemented in a Swift file. I want to connect subviews of that to it, but Xcode won't prompt to create the IBOutlet when I drag from those.
>
> I can't figure out what's going on, but it's very broken. I've tried cleaning and restarting Xcode to no avail.
>
> *The UICollectionViewCell subclass view hierarchy was dragged over from another storyboard in another project. That's the file my new project keeps trying to reference, but I can't figure out why. The other project isn't even open when this happens. I've looked inside the pbxproj file and the storyboard file, and there are no references to that other file. But Xcode keeps showing it.
>
> I've reported this behavior in bugreporter, but I'm really stuck here.

I’ve occasionally had issues getting Xcode to connect outlets and actions. My workaround for it is to open the Assistant view, and drag from your view into the source file, and let Xcode create an outlet or action automatically. Then you can delete the one it created and it should work with the one you already had.

Charles

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Unable to connect IBOutlet in Swift Xcode 7b2
      • From: Rick Mann <email@hidden>
References: 
 >Unable to connect IBOutlet in Swift Xcode 7b2 (From: Rick Mann <email@hidden>)

  • Prev by Date: Unable to connect IBOutlet in Swift Xcode 7b2
  • Next by Date: Re: Unable to connect IBOutlet in Swift Xcode 7b2
  • Previous by thread: Unable to connect IBOutlet in Swift Xcode 7b2
  • Next by thread: Re: Unable to connect IBOutlet in Swift Xcode 7b2
  • Index(es):
    • Date
    • Thread