title: Checking to see if textfields are filled out
body: <p>In my Calorie Tracker App, I have two textfields. One is for the name of the food, and the other is for the amount of calories.To check and see if they are filled I wrote the following code:</p>
  
  <pre><code> if([foodString  isEqual: @" "])
  {
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Warning!" message:@"You have not entered the name of the meal!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
      [alert show];
  }
  
  else if([self.amountText  isEqual: @" "])
  {
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Warning!" message:@"You have not enteted the amount of calories!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
      [alert show];
  }
  
  else if([self.amountText isEqual:@" "] &amp;&amp; [foodString isEqual:@" "])
  {
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Warning!" message:@"You haven't entered anything!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
      [alert show];
  }
  </code></pre>
  
  <p>So for the one where the amountText textfield isn't filled out, but the nameOfFood is filled out, there is an alert. For the rest however, there is no alert. If anyone could provide the proper syntax for checking to see if my textfields are being filled out properly, it would be much appreciated.</p>
  
  <p>Remember, my first textfield is a string value, and the other is an integer value.</p>
  
  <p>Thanks in advance.</p>