title: How to override a small part of a method?
body: <p>I have these methods in a class at the moment which seem to work fine.  I would like to create a subclass which inherits these methods.  The problem I have is that in the third method (shiftViewUpForKeyboard) I want the if statement to be a different UITextField (mirror being the current example).
  I've read that to override a method in the subclass, you have to basically copy it exactly with the new coding, but if I want to just change that small section what is the best way to do it?
  Thank you in advance.</p>
  
  <pre><code>- (void) viewWillAppear:(BOOL)animated {
  
  [[NSNotificationCenter defaultCenter] addObserver: self
                                           selector: @selector(shiftViewUpForKeyboard:)
                                               name: UIKeyboardWillShowNotification
                                             object: nil];
  [[NSNotificationCenter defaultCenter] addObserver: self
                                           selector: @selector(shiftViewDownAfterKeyboard)
                                               name: UIKeyboardWillHideNotification
                                             object: nil];
  
  
  }
  
  - (void) viewDidDisappear:(BOOL)animated {
  [[NSNotificationCenter defaultCenter] removeObserver: self
                                                  name: UIKeyboardWillShowNotification
                                                object: nil];
  [[NSNotificationCenter defaultCenter] removeObserver: self
                                                  name: UIKeyboardWillHideNotification
                                                object: nil];
  
  
  }
  
  - (void) shiftViewUpForKeyboard: (NSNotification*) theNotification;
  {
  if(mirror.isEditing == YES)
  {
  
  CGRect keyboardFrame;
  NSDictionary* userInfo = theNotification.userInfo;
  keyboardSlideDuration = [[userInfo objectForKey: UIKeyboardAnimationDurationUserInfoKey] floatValue];
  keyboardFrame = [[userInfo objectForKey: UIKeyboardFrameBeginUserInfoKey] CGRectValue];
  
  UIInterfaceOrientation theStatusBarOrientation = [[UIApplication sharedApplication] statusBarOrientation];
  
  if UIInterfaceOrientationIsLandscape(theStatusBarOrientation)
      keyboardShiftAmount = keyboardFrame.size.width;
  else 
      keyboardShiftAmount = keyboardFrame.size.height;
  
  [UIView beginAnimations: @"ShiftUp" context: nil];
  [UIView setAnimationDuration: keyboardSlideDuration];
  self.view.center = CGPointMake( self.view.center.x, self.view.center.y - keyboardShiftAmount);
  [UIView commitAnimations];
  viewShiftedForKeyboard = TRUE;
  }
  }
  </code></pre>