Re: Unable to connect IBOutlet in Swift Xcode 7b2
Re: Unable to connect IBOutlet in Swift Xcode 7b2
- Subject: Re: Unable to connect IBOutlet in Swift Xcode 7b2
- From: Fritz Anderson <email@hidden>
- Date: Tue, 14 Jul 2015 14:29:43 -0500
[The thread is a week old, so it may have gone stale…]
On 7 Jul 2015, at 1:58 AM, Rick Mann <email@hidden> wrote:
>
>>
>> On Jul 6, 2015, at 23:22 , Kyle Sluder <email@hidden> wrote:
>>
>> On Mon, Jul 6, 2015, at 07:57 PM, Rick Mann wrote:
>>>
>>>> On Jul 6, 2015, at 17:54 , Charles Srstka <email@hidden> wrote:
>>>>
>>>> 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.
>>>
>>> This is what Xcode is refusing to do. As if the class definition wasn't
>>> matching the class I specified in the storyboard (but it does; I copied
>>> and pasted the name).
>>
>> Is the Module correct?
>
> It's in the same source file as the other view that it does connect to; both module fields are blank in IB
Blank? Not a placeholder for “Current — Your_Target_Name?” The NIB/storyboard loading process for Swift needs an absolute module name, and in my experience, IB’s reference may not survive transfer between projects or targets. The result would be a blank Module field (-> "", not a default). I wish I remembered the solution — I last dealt with it in an Xcode 6 beta.
In the Identity inspector, try manually entering the target’s module name, or deleting the class name and typing it back in in hopes IB will find the class and complete the name and module for you. I may even have rebuilt the scene or storyboard from scratch, but I think that was just thrashing on my part.
— F
_______________________________________________
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