title: How to generate event on button  proragmmatically to go next page  in iphone
body: <p>I have created a button programmatically and I want to fire event to go next page, the event is not generated. What can I do?</p>
  
  <p>This is the code: </p>
  
  <pre><code>btnSignUp =[UIButton buttonWithType:UIButtonTypeRoundedRect];
  btnSignUp.frame =CGRectMake(20,250,280,35);
  [btnSignUp setTitle:@"Sign Up" forState:UIControlStateNormal];
  [btnSignUp addTarget:self action:@selector(registrationPage:)  
      forControlEvents:UIControlEventAllTouchEvents]; 
  
      -(void)registrationPage:(id)sender
      {           
      registration =[[RegistrationPage alloc] initWithNibName:@"Registration" bundle:[NSBundle mainBundle]];
  
          [self.navigationController pushViewController:registration animated:YES];
  
      }
  </code></pre>