title: Disabling a Button to gray color-Objective C
body: <blockquote>
    <p>Hi,   I am new to objective C.I have
    created two buttons using interface
    builder.Instead of writing two
    UIButton actions I have pointed both
    of the buttons to
    -(IBAction)buttonPressed:(id)sender;If i press one Button then the other
    button should be disabled(showing gray
    and should not allow to click).How to
    set this.[button1 setEnabled:NO] will
    do.But how to check which button has
    been pressed.Is it like
    (button.isSelected:YES).And How to
    set that to gray color.</p>
  </blockquote>
  
  <pre><code>- (IBAction)buttonPressed:(id)sender
  {
          if ([myButton.isSelected:YES]) //Invalid receiver type BOOL
            {                            //No '-' method found //cast to pointer to  integer of different size warnings.
                  [myEventLog setEnabled:NO];
                  myTextView.text = @"Processing the request!!";
          }
  }
  </code></pre>
  
  <blockquote>
    <p>Processing the request doesnt get
    printed on the UITextView.</p>
  </blockquote>