Iphone cocos2d与uikit表格图层顺序
我正在学习优秀的教程 它工作得很好,Iphone cocos2d与uikit表格图层顺序,iphone,ios,uikit,cocos2d-iphone,sprite,Iphone,Ios,Uikit,Cocos2d Iphone,Sprite,我正在学习优秀的教程 它工作得很好, 但是我需要一些在我的应用程序上移动的精灵来放在桌面视图上,我已经尝试了属性z,用于cocos 2d,但似乎无法将精灵放在桌面上 tablaMenuBloq = [[[UITableView alloc]initWithFrame:CGRectMake(40, -10, 150, 210) style:UITableViewStylePlain]autorelease]; tablaMenuBloq.transform = CGAffineTransf
但是我需要一些在我的应用程序上移动的精灵来放在桌面视图上,我已经尝试了属性z,用于cocos 2d,但似乎无法将精灵放在桌面上
tablaMenuBloq = [[[UITableView alloc]initWithFrame:CGRectMake(40, -10, 150, 210) style:UITableViewStylePlain]autorelease];
tablaMenuBloq.transform = CGAffineTransformMakeRotation( ( 90 * M_PI ) / 180 );
tablaMenuWrapper =[CCUIViewWrapper wrapperForUIView:tablaMenuBloq];
[self addChild:tablaMenuWrapper];
//first sprite
TSprite *ez = [TSprite spriteWithFile:@"butonA.png"]; //lets create a TSprite, named EZ, and the file is Easy.png.
[ez SetCanTrack:YES];//The sprite can be tracked.
[self addChild: ez z:2 tag:easySprite]; //lets add a tag to the sprite, in order to identify it later
ez.position = ccp(290,300);//position of the sprite
[TSprite track:ez];//and lets add this sprite to the tracked array.
请注意表格后面创建的精灵代码
那么我该如何解决这个问题呢
非常感谢 z索引仅存在于Cocos2D视图的上下文中,并且不会影响视图与添加在其上的子视图的关系 看