GitXplorerGitXplorer
b

HSBackspaceFriendlyTextField

public
12 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
87f249320c26c60cc4c9f2fe7dca1202050c3d21

Convert some spaces to tabs for friendly indenting

bbjhomer committed 10 years ago
Unverified
46ca0c5e567ee1a877aea9393984057a8ff2990a

Extract dynamic subclass registration into separate method.

bbjhomer committed 13 years ago
Unverified
2a20e155319f2dc252c8abd0acbae6eeb6e6fa0d

my_didDeleteBackward -> my_willDeleteBackward.

bbjhomer committed 13 years ago
Unverified
d134ebd126b2b291664f15d6575ef84269a4ffc8

Initial commit

bbjhomer committed 13 years ago

README

The README file for this repository.

HSBackspaceFriendlyTextField

This code is dangerous, and likely to break on minor system updates. Use at your own risk.

This project shows how to detect when the user hits the backspace key at the beginning of a UITextField. There is no publicly exposed mechanism for doing this, so HSBackspaceFriendlyTextField uses some runtime wizardry to subclass an internal UIKit class in order to detect the backspace keypress.

This mechanism is obviously not Apple-approved. I have tested it on iOS 5.0. I make no guarantee about compatibility with future iOS releases, compatibility with the App Store Review Guidelines, or anything else. I've tried to make it fail gracefully, but I cannot anticipate everything Apple might do in the future.

The license on this code is quite simple:

  • Use it however you like.
  • No attribution required.
  • No contributor to this code shall be held liable for any defects, faults, etc. relating to the use of this code. Use at your own risk.