title: Adding a custom UIButton and action to a view in window app delegate (ios)
body: <p>I am working on a tab bar application which needs a global title bar with a setttings button attached. I have achieved adding an imageview to the main window, then a label, another image, and finally a button. However, I cannot get this button to fire an action. it is set up like this:</p>
  
  <pre><code>[settingsButton addTarget:self action:@selector(settings) forControlEvents:UIControlEventTouchupInside];
  </code></pre>
  
  <p>Then the action defined like:</p>
  
  <pre><code>-(void)settings{
          NSLog(@"please do something");
  }
  </code></pre>
  
  <p>However nothing happens, the image doesn't even change like it is being pressed. Can i not define buttons in the app delegate this way? is it because the target is not something that is control based? i tried different targets but i must not fully understand what setting a target is. thanks for any help.</p>
  
  <p>P.S.- i tried setting up the method like so as well:</p>
  
  <pre><code> -(void) settings:(id)sender{
   }
  </code></pre>
  
  <p>and calling it by replacing the action with @selector(settings:) to no avail. Thank you.</p>