-1

I create a Image with the code:

UIImageView *Event01 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Event01.jpg"]];
Event01.frame = CGRectMake(4, 48, 75, 75);
Event01.contentMode = UIViewContentModeScaleAspectFill;
Event01.clipsToBounds = YES;
[self.view addSubview:Event01];

But I decide to change the image and I erase the Image and upload other with the same name, but when I build it there is the old photo. So what I should do to update the UIImage?

Because I had work with MainStoryboard and there I erase the name of the Image, then I upload the new one and just then I put the name to the imageview.

Thanks for the help,

Xoltic
  • 230
  • 2
  • 7

1 Answers1

0

I'm pretty sure it should still work; you might've deleted the new image by accident? First rename the new image to Event02 and then change the code to reflect that; maybe then it will work? I think it is more of a personal error than a coding problem. Make sure when you delete the image move it to trash, and when uploading the image make sure to add it to the build target.

Diremage
  • 200
  • 1
  • 2
  • 10