title: UIButton programatically is not working in iOS
body: <p>When I click on the UIButton nothing happened </p>
  
  <pre><code>checkbox = [[UIButton alloc] initWithFrame:CGRectMake(73, 324, 15, 15)];
  [checkbox setBackgroundImage:[UIImage imageNamed:@"checkbox.png"] forState:UIControlStateNormal];
  [checkbox setBackgroundImage:[UIImage imageNamed:@"checkbox-checked.png"] forState:UIControlStateSelected];
  [checkbox addTarget:self action:@selector(autologin) forControlEvents:UIControlEventTouchUpInside];
  [self.background addSubview:checkbox];
  </code></pre>