How to add an image to an UIView? Here is what I tried so far:
UIView *imageHolder = [[UIView alloc] initWithFrame:CGRectMake(40, 200, 280, 192)];
UIImage *image = [UIImage imageNamed:@"bloodymoon.jpg"];
[imageHolder addSubview:image]; // Error: Incompatible pointer types
[self.mainView addSubview:imageHolder];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With