title: Programmatically Disable Highlight on Click of UIButton
body: <p>There must be a way to do this, but I can't find it. I have a button I have created programmatically:    </p>
  
  <pre><code>UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
  button.frame = CGRectMake(25, self.view.frame.size.height/4, 200, 350);
  [button setTitle:@"Inbox" forState:UIControlStateNormal];
  [button addTarget:self action:@selector(popViewController:) forControlEvents:UIControlEventTouchUpInside];
  [self.view addSubview:button];
  </code></pre>
  
  <p>All I want is for the button not to highlight or change in appearance in any way when it is touched.  So far I have tried the following when creating the button:</p>
  
  <pre><code>[button setBackgroundImage:[UIImage imageNamed:nil] forState:UIControlStateSelected | UIControlStateHighlighted];
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>[button setBackgroundImage:nil forState:UIControlStateSelected];
  </code></pre>
  
  <p>AND </p>
  
  <pre><code>[button setAdjustsImageWhenHighlighted:NO];
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>button.showsTouchWhenHighlighted = NO;
  </code></pre>
  
  <p>Then in the button action I tried:</p>
  
  <pre><code>[sender setHighlighted:!sender.isHighlighted];
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>[sender setSelected:!sender.isSelected];
  </code></pre>
  
  <p>None of these work. </p>