So, I have a declaration and definition below,
-(UIImageView *)returnImageView:(UIImageView *)myImageView color:(UIColor *)imageViewColor x:(int)xParameter y:(int)yParamater width:(int)widthParameter height:(int)heightParameter { CGRect cellFrame = CGRectMake(xParameter, yParamater, widthParameter, heightParameter); style:UITableViewStyleGrouped]; myImageView = [myImageView initWithFrame:cellFrame]; myImageView.backgroundColor =imageViewColor; myImageView.opaque = YES; return myImageView; }
This method will return the image.
I'm trying to call him
UIImageView *myImageViews; UIColor *tableColor = [UIColor blueColor] ; [self.view addSubview:[returnImageView:myImageViews color:tableColor x:17 y:10 width:290 height:230];
which gives a compiler error when using the undeclared identifier returnImageView. What causes the error?
thanks
source share