title: textFieldShouldBeginEditing not being called
body: <p>I am trying to use <code>textFieldShouldBeginEditing</code> to disable the keyboard from showing up for a custom <code>UITextField</code>. I'm implementing all the <code>UITextFieldDelegate</code> methods. However, for some reason, <code>textFieldShouldBeginEditing</code> actually never gets called.  </p>
  
  <p>The following delegate methods ALWAYS get called:</p>
  
  <pre><code>– textFieldDidBeginEditing:
  – textFieldShouldEndEditing:
  – textFieldDidEndEditing:
  </code></pre>
  
  <p>The view is structured in the following way:</p>
  
  <p><code>UIViewController</code> which holds a scrollview. Depending on the state of the view, this ScrollView will contain a <code>UIView</code> with a list of custom <code>UITextFields</code>. </p>
  
  <p>I'm running iOS 4.3.5 (8L1) on this device.</p>
  
  <p>Any ideas?</p>
  
  <p>Edit; added some code snippets:</p>
  
  <p><code>UIViewController</code> has the following interface</p>
  
  <pre><code>@interface AViewController: UIViewController&lt;UITextFieldDelegate&gt;
  </code></pre>
  
  <p>Once the UIViewController loads, I connect all UITextFields to the view using</p>
  
  <pre><code>aSubView.aTextField.delegate = self;
  </code></pre>
  
  <p>(Simplified) delegate implementations located in AViewController</p>
  
  <pre><code>- (void)textFieldDidBeginEditing:(UITextField *)textField
  {
  }
  
  - (void)textFieldDidEndEditing:(UITextField *)textField
  {
  }
  
  - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
  {
      return YES;
  } 
  
  - (BOOL)textFieldShouldEndEditing:(UITextField *)textField
  {
      return YES;
  }
  
  - (BOOL)textFieldShouldReturn:(UITextField *)textField
  {
      return YES;
  }
  </code></pre>
  
  <p>Custom <code>UITextField</code> code</p>
  
  <p>Simplified implementation file --</p>
  
  <pre><code>#import "PVEntryTextField.h"
  #import "EntryViewController.h"
  
  @implementation PVEntryTextField
  @synthesize isPasswordField, state, singleTap;
  
  - (id)initWithCoder:(NSCoder *)inCoder
  {
      if (self = [super initWithCoder:inCoder])
      {
           self.font = [UIFont fontWithName:@"Helvetica-Bold" size:19];
           self.textColor = [UIColor colorWithRed:51.0/255.0 
                                           green:51.0/255.0 
                                            blue:51.0/255.0 
                                           alpha:1.0];
           self.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
      }
  
      return self;
  }
  
  - (CGRect)textRectForBounds:(CGRect)bounds
  {
      return CGRectMake(bounds.origin.x + 16, bounds.origin.y,
                        bounds.size.width - 16*2 - 10, bounds.size.height);
  }
  
  - (CGRect) editingRectForBounds:(CGRect)bounds
  {
      return [self textRectForBounds:bounds];
  }
  
  - (BOOL) canBecomeFirstResponder
  {
      return YES;
  }
  
  - (void) updateState:(int) newState
  {
       state = newState;
   }
  
  - (void)dealloc
  {
      [super dealloc];
  }
  
   @end
  </code></pre>