Hi,
I get the following warning when calling the initWithNumberOfSides from the init method, which is in a init override in a custom class I have created.
The code is as follows
The warning error appears however, the code still runs and completes correctly. Could anyone provide any advice on resolving the warning message?
Thanks for the help
I get the following warning when calling the initWithNumberOfSides from the init method, which is in a init override in a custom class I have created.
Code:
'PolygonShape' may not respond to '-initWithNumberOfSides:minimumNumberOfSides:maximumNumberOfSides:'
The code is as follows
Code:
- (id)init {
if (self = [super init]) {
[self initWithNumberOfSides:4 minimumNumberOfSides:3 maximumNumberOfSides:10];
}
return self;
}
- (id)initWithNumberOfSides:(int)sides minimumNumberOfSides:(int)min maximumNumberOfSides:(int)max; {
if (self = [super init]) {
[self setMinimumNumberOfSides:min];
[self setMaximumNumberOfSides:max];
[self setNumberOfSides:sides];
}
return self;
}
The warning error appears however, the code still runs and completes correctly. Could anyone provide any advice on resolving the warning message?
Thanks for the help