UITextField documentation is misleading

Originator:GeoffPado
Number:rdar://15698299 Date Originated:12-19-2013
Status:Open Resolved:
Product:Documentation Product Version:
Classification:Other Bug Reproducible:N/A
 
Summary:
UITextField has two methods, -drawPlaceholderInRect and -drawTextInRect. The documentation for both of these methods states "If you want to customize the drawing behavior for the text, you can override this method to do your drawing." However, this is not true. UITextField draws text differently internally, and these methods are in fact never called.

Steps to Reproduce:
1. Create a subclass of UITextField.
2. Override -drawTextInRect, as per documentation.

Expected Results:
-drawTextInRect is called, and your subclass's implementation is invoked.

Actual Results:
The method is never called. After trying to debug it, resort to Google and find both an Apple Discussions and a Stack Overflow post saying that the method is never called. 

Version:
UITextField Class Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextField_Class/Reference/UITextField.html#//apple_ref/doc/uid/TP40006888-CH3-SW33

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!