title: selectedTextRange always returning nil
body: <p>I have a subclass of <code>UITextField</code> like:</p>
  
  <pre><code>@interface CustomTextField : UITextField
  
  -(NSRange) getSelection;
  
  @end
  
  @implementation CustomTextField
  
  -(NSRange) getSelection
  {
  
      UITextRange *selectedRange = [self selectedTextRange];
      UITextPosition* selectionStart = selectedRange.start;
      UITextPosition* selectionEnd = selectedRange.end;
  
      const NSInteger position1 = [self offsetFromPosition:self.beginningOfDocument toPosition:selectionStart];
      const NSInteger position2 = [self offsetFromPosition:self.beginningOfDocument toPosition:selectionEnd];
      return NSMakeRange(position1, position2);
  }
  
  @end
  </code></pre>
  
  <p>But here whenever I place cursor in textfield, and call <code>getSelection</code> method <code>selectedRange</code> is always nil, so <code>selectedTextRange</code> is not updating why? when I added @synthesize selectedTextRange then the property is updated. So is there any issue with inheritance?</p>