title: Objective-C: using if/else statement with Plist values
body: <p>I'm sure this is really basic but I can't see what I'm doing wrong. Can someone help me understand where I'm going wrong please? I'm working in xcode. I'm trying to make different parts of my view appear depending on values saved in a property list. If the value assigned to a particular UITextField is equal to zero then I want to hide that UITextField. I'm trying to do this like this. gross is the name of a UITextField:</p>
  
  <pre><code>NSArray *array = [[NSArray alloc] initWithContentsOfFile:filePath];
  gross.text = [array objectAtIndex:7];
  
  if ([array objectAtIndex:7 == 0]) {
      gross.hidden = YES;
  }
  else {
      gross.hidden = NO;
  }
  
  [array release];
  </code></pre>
  
  <p>I think the problem is something to do with how I've wrote the if/else statement. I know this is really basic but I don't quite understand where I'm going wrong. So Your help is much appreciated. </p>