How can I set image to UIImage object. For example:
UIImage
UIImage *img = [[UIImage alloc] init]; [img setImage:[UIImage imageNamed:@\"anyImageName\"]]
may be:
UIImage *img = [[UIImage alloc] init];
and when you want to change the image:
img = [UIImage imageNamed:@"nameOfPng.png"];
but the object wasn't in the same place in the memory, but if you use the pointer, the same pointer will be point to the last image loaded.