Re: Outlets are nil after awakeFromNib call
Re: Outlets are nil after awakeFromNib call
- Subject: Re: Outlets are nil after awakeFromNib call
- From: Michael David Crawford <email@hidden>
- Date: Sun, 10 May 2015 10:04:55 -0700
I don't know why they are nil, but in general it is quite helpful to
use assertions anywhere you could have made a coding error.
This is, rather than:
void foo: (char*)buf
{
// buf points to a valid C string
...
}
use this:
void foo: (char*)buf
{
assert( buf != NULL );
...
}
On 5/10/15, Sasikumar JP <email@hidden> wrote:
> Hi,
>
> I am observing outlets are nil after the awakeFromNib call in my
> viewcontroller which is created from the storyboard.
>
> As per the apple documentation, awakeFromNib will be called after
> initialising all the objects and outlets for a view controller from nib.
>
> i hope awakeFromNib is valid for storyboard too.
>
> my application is crashing if i do any operation on the outlet var. I am
> using Xcode 6.3 with Swift.
>
>
> Regards
> Sasikumar JP
> _______________________________________________
>
> 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
--
Michael David Crawford, Consulting Software Engineer
email@hidden
http://www.warplife.com/mdc/
Available for Software Development in the Portland, Oregon Metropolitan
Area.
_______________________________________________
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