求助,UIImageView的问题(在线傻等)

我通过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
求助~~~~:’(

就是喜欢你的帖子 没办法

现在编辑器支持Plist大图解析成小图在编辑器中使用 现在的资源设置都需要两个参数 第一个是图片路径 TextureResType表示你的图片是平常的资源 还是从Plist解析出来的资源

— Begin quote from ____

%url%伟大的流啊氓 发表于 2013-8-27 14:14
经过反复尝试
改成next->setTexture(“image/1.png”,TextureResType::UI_TEX_TYPE_PLIST);
该问题解决…… …

— End quote

为什么这样就行啦?那个1.png是在一张大图中,通过plist来定位的么?

经过反复尝试
改成next->setTexture(“image/1.png”,TextureResType::UI_TEX_TYPE_PLIST);
该问题解决……:frowning:

— Begin quote from ____

%url%伟大的流啊氓 发表于 2013-8-27 14:14
经过反复尝试
改成next->setTexture(“image/1.png”,TextureResType::UI_TEX_TYPE_PLIST);
该问题解决…… …

— End quote

为什么这样就行啦?那个1.png是在一张大图中,通过plist来定位的么?