0

As far as I can tell, UIImageViews in XIBs don't use +imageNamed. I also tried +imageWithContentsOfFile, but that was no dice also.

Which UIImage method do Interface Builder XIBs use to load images in ImageViews?

Tim
  • 14,447
  • 6
  • 40
  • 63
  • I'm also wondering this. I was just trying to swizzle the imageNamed function so that it would automatically load ~568h images, but that didn't work from images defined in the XIB file. – bendahmon May 25 '13 at 11:50
  • 1
    It's `initWithCoder:` and it's very annoying to mess with. – Tim May 26 '13 at 03:58

1 Answers1

0

See the link given below, it will might help you. Most probably 3rd Answer will help you,

How can I change the image displayed in an UIImageView programmatically?

the last method shoud be fired when you set image in XIB

    [YOURCONTROLLER.imageToDisplay setImage:[UIImage imageNamed:value]];
Community
  • 1
  • 1
Khushbu Patel
  • 158
  • 1
  • 7