title: Set target of UIButton to IBAction not working (Objective-C)
body: <p>Is there any reason the following code for setting the target of a UIButton to an IBAction programmatically shouldn't work? </p>
  
  <p>.h</p>
  
  <pre><code>- (IBAction)googleIt:(id)sender;
  </code></pre>
  
  <p>.m </p>
  
  <pre><code>UIButton *google = [[UIButton alloc] initWithFrame:CGRectMake(20.0, 15.0, 280.0, 40.0)];
  [google addTarget:self action:@selector(googleIt:) forControlEvents:UIControlEventTouchUpInside];
  </code></pre>
  
  <p>(that's in view did load, this is after that) </p>
  
  <pre><code>-(IBAction)googleIt:(id)sender {
  [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.google.com"]];
  }
  </code></pre>
  
  <p>Edit: added a : after googleIt, still doesn't work. When I add a button in storyboard and just connect it to the IBAction, that works, so the IBAction itself is not the problem.</p>
  
  <p>Edit: full button code requested </p>
  
  <pre><code> UIButton *google = [[UIButton alloc] initWithFrame:CGRectMake(20.0, 15.0, 280.0, 40.0)];
  [google addTarget:self action:@selector(googleIt:) forControlEvents:UIControlEventTouchUpInside];
  [google setTitle:@"Google 'em" forState:UIControlStateNormal];
  [google setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  google.backgroundColor = [UIColor blackColor];
  [charityInfo addSubview:google];
  </code></pre>
  
  <p>EDIT: DONE! User action not enabled. Can somebody put that answer and I'll markas true?</p>