• 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: Outlets are nil after awakeFromNib call
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Outlets are nil after awakeFromNib call (From: Sasikumar JP <email@hidden>)

  • Prev by Date: Outlets are nil after awakeFromNib call
  • Next by Date: Re: Core Data sync between iOS and Mac apps
  • Previous by thread: Outlets are nil after awakeFromNib call
  • Next by thread: Re: Outlets are nil after awakeFromNib call
  • Index(es):
    • Date
    • Thread