title: enabled a programmatically created button in Xcode
body: <p>I know how to set the enable = YES/NO, a button created using a property and xib. However, how do you do the same thing to a programmatically created button from another method in the same class?</p>
  
  <p>For example here is my button in the viewDidLoad:</p>
  
  <pre><code>UIButton *AllList = [UIButton buttonWithType:UIButtonTypeCustom];
  AllList.frame = CGRectMake(40, 80, 107.f, 53.5f); //set frame for button
  
  UIImage *buttonImageFull = [UIImage imageNamed:@"allModsBtn.png"];
  [AllList setBackgroundImage:buttonImageFull forState:UIControlStateNormal];
  [self.view addSubview:AllList];
  
  // add targets and actions
  [AllList addTarget:self action:@selector(getButtons:) forControlEvents:UIControlEventTouchUpInside];    
  AllList.tag = 0;
  </code></pre>
  
  <p>I would like to set the enable of this button to YES or NO in another method.</p>