CCScrollView , did not show only if I drag it . I don't know how to make it display at program start first time.

this is my code:

`bool MissionLayer::init()
{
bool b = false;
do
{
CC_BREAK_IF(!CCLayer::init());
CCSize size = CCDirector::sharedDirector()->getWinSize();

    CCSprite* missionInfoSprite = CCSprite::create("map_paper_bg_new1.png");
    missionInfoSprite->setPosition(ccp( missionInfoSprite->getContentSize().width / 2 + 40, size.height / 2 - 40 ));
    //this->addChild(missionInfoSprite);

    CCSprite* exploreInfoSprite = CCSprite::create("map_paper_bg_new2.png");
    exploreInfoSprite->setPosition(ccp(missionInfoSprite->getContentSize().width + 40 + exploreInfoSprite->getContentSize().width / 2 + 40, size.height / 2 - 40));
    //this->addChild(exploreInfoSprite);

    CCSprite* pkInfoSprite = CCSprite::create("map_paper_bg_new3.png");
    pkInfoSprite->setPosition(ccp(exploreInfoSprite->getPositionX() + exploreInfoSprite->getContentSize().width / 2 + 40 + pkInfoSprite->getContentSize().width / 2, size.height / 2 - 40)); 
    //this->addChild(pkInfoSprite);


    CCMenuItemImage* explore_button = CCMenuItemImage::create("explore_button2.png", "explore_button.png", this, menu_selector(MissionLayer::menuExploreCallBack));
    CCMenuItemImage* mission_button = CCMenuItemImage::create("mission_button2.png", "mission_button.png", this, menu_selector(MissionLayer::menuMissionCallBack));
    CCMenuItemImage* pk_button = CCMenuItemImage::create("pk_button2.png", "pk_button.png", this, menu_selector(MissionLayer::menuPkCallBack));

    //mission_button->setPosition(ccp(size.width / 2 + 20, size.height / 2 - mission_button->getContentSize().height - 50));
    //explore_button->setPosition(ccp(mission_button->getPositionX() + mission_button->getContentSize().width + 1, mission_button->getPositionY()));
    //pk_button->setPosition(ccp(mission_button->getPositionX() - mission_button->getContentSize().width - (pk_button->getContentSize().width / 2 - mission_button->getContentSize().width / 2) - 1, mission_button->getPositionY() ));

    explore_button->setPosition(ccp((exploreInfoSprite->getPositionX() + exploreInfoSprite->getContentSize().width / 2) - 80, (exploreInfoSprite->getPositionY() - exploreInfoSprite->getContentSize().height / 2) + 80) );
    mission_button->setPosition(ccp(missionInfoSprite->getPositionX() + missionInfoSprite->getContentSize().width / 2 - 80, missionInfoSprite->getPositionY() - missionInfoSprite->getContentSize().height / 2  + 80));
    pk_button->setPosition(ccp(pkInfoSprite->getPositionX() + pkInfoSprite->getContentSize().width / 2 - 80, pkInfoSprite->getPositionY() - pkInfoSprite->getContentSize().height / 2 + 80));


    CCMenu* pMenu = CCMenu::create(explore_button, mission_button, pk_button, NULL);
    pMenu->setPosition(CCPointZero);

    //this->addChild(pMenu, 5, 800);

    this->layerScroll = CCLayer::create();

    //layerScroll->setAnchorPoint(CCPointZero);
    layerScroll->setContentSize(CCSizeMake(missionInfoSprite->getContentSize().width * 3, size.height));
    layerScroll->setPosition(ccp(layerScroll->getContentSize().width / 2, layerScroll->getContentSize().height / 2 + 20));


    layerScroll->addChild(missionInfoSprite);
    layerScroll->addChild(pkInfoSprite);
    layerScroll->addChild(exploreInfoSprite);
    layerScroll->addChild(pMenu);

    //this->addChild(layerScroll);
    scrollView = CCScrollView::create();
    scrollView->setAnchorPoint(CCPointZero);
    scrollView->setPosition(ccp(0, 0));
    scrollView->setContainer(this->layerScroll);
    scrollView->setContentSize(CCSizeMake(layerScroll->getContentSize().width + 180 /*+ missionInfoSprite->getContentSize().width*/, size.height));
    scrollView->setViewSize(CCSizeMake(640, layerScroll->getContentSize().height + 40));
    scrollView->setDirection(kCCScrollViewDirectionHorizontal);

    this->addChild(scrollView);

    b = true;
    return b;
} while (1);
return b;

}`

:slight_smile:

Can you help me?Thank you.