您的位置:首页 > 产品设计 > UI/UE

UIImageView为图片添加点击事件

2014-09-07 17:30 381 查看
UIImageView* _bg = dynamic_cast<UIImageView*>(_uiPanel->getChildByName("bg"));
_bg->addTouchEventListener(this, toucheventselector(WelcomeLayer::start_callback));
_bg->setTouchEnabled(true);
必须setTouchEnabled才行,这样才会使得图片可点击。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: