CCEditBoxImplApple: merged code for iOS and Mac OS X