controlSwitch->setPosition(ccp(240,160)); //這個函數(shù)對應初始時,開關(guān)的狀態(tài)是開還是關(guān)。 controlSwitch->setOn(true); //這個函數(shù)對應開關(guān)能否使用。 controlSwitch->setEnabled(true); //添加事件監(jiān)聽 controlSwitch->addTargetWithActionForControl
www.dbjr.com.cn/article/550...htm 2025-6-7