I have a tile object like so
- (id)initWithFrame:(CGRect)frame withImageNamed:(NSString*) imageName value:(int) tileValue{
if (self = [super initWithFrame:frame]) {
//initilization code
image = [[UIImageView alloc]
initWithImage: [UIImage imageNamed: imageName]];
image.frame = self.bounds;
image.opaque = YES;
[self addSubview:image];
valueOfTile = tileValue;
} return self;
}
I'm attempting to create an object:
tile1 = [[TileView alloc]
initWithFrame:CGRectMake(20,20, 100, 150)
value:1
withImageNamed:@"tile1.png"];
I was able to get this to work when I didn't have the value information added, but it's now giving me this error: Instance method '-initWithFrame:value:withImageNamed:' not found (return type defaults to 'id')
I'm not exactly sure where I'm going wrong here.