• 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: initWithFrame fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: initWithFrame fails


  • Subject: Re: initWithFrame fails
  • From: Roland King <email@hidden>
  • Date: Thu, 25 Dec 2014 11:45:54 +0800


On 25 Dec 2014, at 11:30, N!K <email@hidden> wrote:



Thank you all for explaining what’s going on. I looked up initWithCoder; it is not suitable for my usage. 

In what way is initWithCoder: not suitable for your usage? What is the code you had in initWithFrame: which you want called and why can you not put that code into initWithCoder:? Have you even implemented a simple initWithCoder: method and checked that is the one being called during the NIB loading by the way -  before we go any further down this track. 

My classes often end up looking something like this with the init code factored out into a separate method called from any of the initializers. 

-(void)My_Class_Internal_Init
{
.. init code ..
}

-(id)init
{
self = [ super init ];
if( self )
[ self My_Class_Internal_Init ];

return self;
}

-(id)initWithCoder:(NSCoder*)coder
{
self = [ super initWithCoder:coder ];

if( self )
[ self My_Class_Internal_Init ];

return self;
}

-(id)initWithFrame: ... // etc etc 


 _______________________________________________
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

  • Follow-Ups:
    • Re: initWithFrame fails
      • From: N!K <email@hidden>
References: 
 >initWithFrame fails (From: N!K <email@hidden>)
 >Re: initWithFrame fails (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: initWithFrame fails
  • Next by Date: Re: initWithFrame fails
  • Previous by thread: Re: initWithFrame fails
  • Next by thread: Re: initWithFrame fails
  • Index(es):
    • Date
    • Thread