Re: initWithFrame fails
Re: initWithFrame fails
- Subject: Re: initWithFrame fails
- From: Roland King <email@hidden>
- Date: Thu, 25 Dec 2014 11:45:54 +0800
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