Is there something wrong with this code? I am trying to customize some buttons by defining at runtime a label, callback selector and, later, a pointer to UIButton itself. But with this code, I get EXC_BAD_ACCESS. If you delete the line using NSSelectorFromString, it will disappear. But since this is just an object added to the dictionary, I do not understand that it is shy.
NSMutableDictionary *attachButtonDictionary = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Attach To Job",@"keyForLabel",
NSSelectorFromString(@"attachToJob"), @"keyForSelector",
nil];
source
share