title: Passing arguments by value or by reference in objective C
body: <p>I'm kind of new with objective c and I'm trying to pass an argument by reference but is behaving like it were a value. Do you know why this doesn't work?</p>
  
  <p>This is the function:</p>
  
  <pre><code>- (void) checkRedColorText:(UILabel *)labelToChange {
      NSComparisonResult startLaterThanEnd = [startDate compare:endDate];
      if (startLaterThanEnd == NSOrderedDescending){
          labelToChange.textColor = [UIColor redColor];
      }
      else{
          labelToChange.textColor = [UIColor blackColor];
      }
  
  }
  </code></pre>
  
  <p>And this is the call:</p>
  
  <pre><code>UILabel *startHourLabel; // This is properly initialized in other part of the code
  [self checkRedColorText:startHourLabel];
  </code></pre>
  
  <p>Thanks for your help</p>