5

The UIImageView is placed in interface builder. I already created an IBOutlet. How do i programmatically change the UIImageView to view another image.

Can someone please help me?

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
Pavan
  • 17,840
  • 8
  • 59
  • 100

1 Answers1

9

If myImageView is your outlet, then in code, you can use:

myImageView.image = [UIImage imageNamed: @"myNewImage.png"];
Ben Gottlieb
  • 85,404
  • 22
  • 176
  • 172