我通过CCUIHELPER->addSpriteFrame(“imags0.plist”);加载资源,已经确定,资源加载是成功的
//创建一个UILayer层
UILayer* ul =UILayer::create();
//开启刷新函数
ul->scheduleUpdate();
//将UILayer层加入到当前的场景
this->addChild(ul);
UIImageView * next=UIImageView::create();
next->setTexture(“image/1.png”);
CCSpriteFrame* fram=CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(“image/1.png”);
CCSprite * sprite=CCSprite::create();
this->addChild(sprite);
next->setPosition(ccp(100,100));
ul->addWidget(next);
上述代码里的sprite是为了确定资源是否存在编写的
运行后,能看到sprite,但是看不到next
求助~~~~:’(