感谢点评与关注,欢迎转载与分享。
勤奋努力,持之以恒!
首先,在项目中打开CCEditBox.h文件,在枚举EditBoxInputMode中添加一代表纯数字的枚举类型kEditBoxInputModePadNumber代码如下:
enum EditBoxInputMode
{
/**
* The user is allowed to enter any text, including line breaks.
*/
kEditBoxInputModeAny = 0,
/**
* The user is allowed to enter an e-mail address.
*/
kEditBoxInputModeEmailAddr,
/**
* The user is allowed to enter an integer value.
*/
kEditBoxInputModeNumeric,
/**
* The user is allowed to enter a phone number.
*/
kEditBoxInputModePhoneNumber,
/**
* The use