I am having a SEL variable which I want to set in my button selector.
My code goes like this:
GridView *ObjGridView=[[GridView alloc]initWithFrame:frame];
[[NSBundle mainBundle ] loadNibNamed:@"GridView" owner:ObjGridView options:nil];
CATEGORY *ObjCategory=[arrCategory objectAtIndex:index];
//do something
ICON *ObjIcno=[ObjCategory.arrIconObjects objectAtIndex:indexIcon];
[ObjGridView.button1 addTarget:self action:ObjIcno.handler forControlEvents:UIControlStateNormal];
ObjIcno.handler is a SEL variable (which is previously set by a selector )
Like this:
arrSectonProductivityTools=[NSMutableArray arrayWithObjects:[[[ICON alloc]initWithIcon:@"firefox.png":@"Firefox":@selector(FirefoxCickEvent:)] autorelease],nil];
I set the selector in my class this way, which is setting properly but I am not getting the click event on it.
should be:
For more options besides UIControlEventTouchUpInside, do cmd+mouse click on UIControlEventTouchUpInside.