In my application i created a button on the google maps mapview as a subview. now how to add click event to that button. That button is visible in app but not visible in nib file. how to add the event
Asked
Active
Viewed 375 times
-1
-
i got the answer. sorry for posting without proper search – BalaChandra Aug 14 '13 at 11:30
2 Answers
0
You can try this,
[button addTarget:self action:@selector(myButtonClick:) forControlEvents:UIControlEventTouchUpInside];
Implement :
-(IBAction)myButtonClick:(id)sender
{
// button cliked...
}

Toseef Khilji
- 17,192
- 12
- 80
- 121
0
just try adding target to your button like
[button addTarget:yourObject action:@selector(yourMethod:) forControlEvents:UIControlEventTouchUpInside];

Agent Chocks.
- 1,312
- 8
- 19