title: UIAlertView-Show red if data not entered
body: <p>I have a save button, which on click shows an alert box.I want the user to enter some data in the box and if he/she does not enter any data and press ok I want to make the alert box text field red i.e indicating its mandatory.For the moment I am showing another alert box.Please help me,Thanks.
  following is the code.</p>
  
  <pre><code>-(void) saveCalculaterData{
  
    UIAlertView *prompt = [[UIAlertView alloc] initWithTitle:REFERENCE_ID
                                                   message:@"\n\n"
                                                  delegate:self
                                         cancelButtonTitle:@"Cancel"
                                         otherButtonTitles:@"OK", nil];
  
    textField = [[UITextField alloc] initWithFrame:CGRectMake(12, 50, 260, 25)];
    textField.tag=REFERENCE_FIELD;
    [textField setBackgroundColor:[UIColor whiteColor]];
    [textField setPlaceholder:ADD_REFERENCE_ID];
    [prompt addSubview:textField];
  
  
  
    [prompt show];
  
  
    [textField becomeFirstResponder];
    textField.delegate=self;
    }
  
   - (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex 
   {
    if(buttonIndex &gt; 0) {
          NSString *textValue = textField.text;
      if ([textField.text length] &lt;= 0)
      {
          UIAlertView *alert = [[UIAlertView alloc]initWithTitle: @"No Reference"
                                                         message: @"msg"
                                                        delegate: self
                                               cancelButtonTitle:@"Cancel"
                                               otherButtonTitles:nil,nil];
  
  
          [alert show];
  
      }
  
      else{
           CalculatorData *calcData = [self getCalcData];
           calcData.dataKey = textValue;
   if([database saveCalculatorData:(CalculatorData *)calcData tableName:[database Table]]){
           [Utils showAlert:RECORD_SAVED];
          }
       }
     }
  
   }
  </code></pre>