UITextField+YYAdd.h 635 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // UITextField+YYAdd.h
  3. // YYKit <https://github.com/ibireme/YYKit>
  4. //
  5. // Created by ibireme on 14/5/12.
  6. // Copyright (c) 2015 ibireme.
  7. //
  8. // This source code is licensed under the MIT-style license found in the
  9. // LICENSE file in the root directory of this source tree.
  10. //
  11. #import <UIKit/UIKit.h>
  12. NS_ASSUME_NONNULL_BEGIN
  13. /**
  14. Provides extensions for `UITextField`.
  15. */
  16. @interface UITextField (YYAdd)
  17. /**
  18. Set all text selected.
  19. */
  20. - (void)selectAllText;
  21. /**
  22. Set text in range selected.
  23. @param range The range of selected text in a document.
  24. */
  25. - (void)setSelectedRange:(NSRange)range;
  26. @end
  27. NS_ASSUME_NONNULL_END