I have an IBOutlet
to a UIImageView
, but when I look at the UIImageView
doc, I can\'t see any hints about programmatically changing it
If you want to set image to UIImageView
programmatically then Dont Forget to add UIImageView
as SubView to the main View.
And also dont forgot to set ImageView Frame.
here is the code
UIImageView *myImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
myImage.image = [UIImage imageNamed:@"myImage.png"];
[self.view addSubview:myImage];