If I have a class that is setup like this to customize a UIView.
@interface myView : UIView
- (id)init {
self = [super init];
if(self){
UIView init
calls UIView initWithFrame:
. Since you override both, calling your init
method results in your initWithFrame:
method being called:
In other words: your init
calls UIView init
. UIView init
calls initWithFrame:
. Since you override initWithFrame:
, your initWithFrame:
is called which in turn calls UIView initWithFrame:
.
The solution, since your initWithFrame:
will always be called, is to remove the call to foo
from your init
method.