-1

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

BalaChandra
  • 632
  • 9
  • 33

2 Answers2

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