Currently, to create an EAGLView object, two initXXX method need to be called. For example:
- (id) viewWithFrame:(CGRect)frame
{
return [[[[self alloc] init] initWithFrame:frame] autorelease];
}
This is not quite right. By right, a valid object should be created with only “[[self alloc] initWithFrame:frame].”
One solution is to rename init to something like commonInit (also hide it from header file), and call it in all other init functions.