Hi,
i´ve created different buttons and initalized them with an array with photos as backgroundImage.
UIButton* myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[myButton setBackgroundImage:[UIImage imageNamed: (NSString*) obj ] forState:UIControlStateNormal];
[myButton addTarget:nil action:@selector(buttonDown: ) forControlEvents:UIControlEventTouchUpInside];
Here´s my buttonDown-method:
-(void) buttonDown:(UIButton*) sender {
NSLog(@"pressed: %@", sender.currentBackgroundImage );}
That traced me that: "pressed: < UIImage: 0x6625c40 >"
Now i want to know how can i get that image-name of any clicked button? Would be nice to know.Thanks for your time.