// get whole screen size
CCSize size= CCDirector::sharedDirector()->getWinSize();
//add background
CCSprite* uiBackground = CCSprite::create("main_background.png",CCRectMake(0, 0, 640, 960));
uiBackground->setPosition(ccp(size.width/2, size.height/2));
this->addChild(uiBackground, 0); // the bottom layer