Label's position will be changed after changing the first character width of the digital label control in the property window.
Label's position will be changed after changing the first character width of the digital label control in the property window.
Bug #2194 [Closed]
eddy 2013-05-22 03:22
. Updated over 8 years ago
- Assignee changed from houlong@chukong-inc.com to pipu
严重影响使用,必须修改
- Status changed from New to Resolved
- Assignee changed from pipu to houlong@chukong-inc.com
问题原因:
因为 TextField 没有文本及占位文本影响到控件底层渲染节点 CCTextFieldTTF 的 contentSize 变为 (0, 0), 造成控件因为得不到宽高而不能触发 onTouchBegan。
修改方式:
上层添加例如:ImageView 这种带有纹理或颜色的控件到 TextField 底部,即先添加 ImageView 后添加 TextField,使 ImageView 在 TextField 下面渲染。然后为这类控件绑定触摸事件,在事件回调函数中驱动 TextField 控件弹出键盘。
- Assignee changed from houlong@chukong-inc.com to eddy
- % Done changed from 0 to 100