I have a view controller with different buttons with background images assigned. My header file looks as follows:
@interface ImageSelect : UIViewController
- (IBAction)ImageButton:(id)sender;
- (IBAction)Done:(id)sender;
@property(nonatomic, readonly, retain) UIImage *currentImage;
@end
And the section of my main file that contains the button method looks like:
- (IBAction)ImageButton:(id)sender {
if ([@"railway-336702_1280.jpg" isEqual:self.currentImage]) {
img = @"railway-336702_1280.jpg";
NSLog(@"Test");
}
}
I am wanting to save the image name to a NSString called img. Currently, the code runs but doesn't actually perform the save to img.

NSString * imageNameand check that?