title: iOS - Can not set Button 'Disable', without removing the content of it
body: <p>Sorry for what should be a simple solution.</p>
  
  <p>I am trying to 'Disable' a button in code using the following Code:</p>
  
  <p>in the first Class which Called 'CheckBox': </p>
  
  <p>checkBox.h :</p>
  
  <pre><code>@interface CheckBox : UIViewController 
  {   
     BOOL checkboxSelected;
     UIButton *checkBoxButton;
  }
  
   @property (nonatomic, retain) IBOutlet UIButton *checkBoxButton;
  
  
  - (IBAction)checkBoxButton:(id)sender;
  
  
  -(void) setCheckBoxSelected:(BOOL)checkingStatus;
  -(void) setCheckBoxEnabled:(BOOL)enablingStatus;
  </code></pre>
  
  <p>in checkBox.m :</p>
  
  <pre><code>- (IBAction)checkBoxButton:(id)sender {
  
  if (checkboxSelected == 0){
      [checkBoxButton setSelected:YES];
      checkboxSelected = 1;
  
  } else {
  
      [checkBoxButton setSelected:NO];
      checkboxSelected = 0;
        }
  }
  
   -(void) setCheckBoxSelected:(BOOL)checkingStatus {
  
     checkBoxButton.selected = checkingStatus;
       }
  
   -(void) setCheckBoxEnabled:(BOOL)enablingStatus {
  
      [checkBoxButton setEnabled:enablingStatus];
     }
  </code></pre>
  
  <p>and in the implementation of another class which called 'MainViewController.m' :</p>
  
  <pre><code>- (void)viewDidLoad{
  
       allTransactionCheckBox = [[CheckBox alloc] init];
       [self.viewWithdraw addSubview:withdrawCheckBox.view ]; 
       withdrawCheckBox.labelCheckBox.textColor = [UIColor blackColor];
       withdrawCheckBox.labelCheckBox.font = [UIFont systemFontOfSize:14];
       withdrawCheckBox.labelCheckBox.text = @"Withdraw";   
  
       [withdrawCheckBox setCheckBoxSelected:YES];
   }
  </code></pre>
  
  <p>The above code is 'Disable' the button, but it (Remove/ Hide) the 'check mark Picture' inside the button.Why?</p>
  
  <p>All links ( outlet + Actions ) are connected .</p>
  
  <p>What obvious thing am I missing? Thanks.</p>