Ios 按值传递的结构参数包含未初始化的数据
我在下面的代码部分中得到了以下“传递值结构参数包含未初始化数据”:Ios 按值传递的结构参数包含未初始化的数据,ios,objective-c,xcode,cocos2d-iphone,Ios,Objective C,Xcode,Cocos2d Iphone,我在下面的代码部分中得到了以下“传递值结构参数包含未初始化数据”: for ( int i = 0; i < 48; i++ ) { CGPoint posLevel; LevelButton* pBtn; if ( i >= 0 && i < 24 ) { int nXX = (i % 4 + 1); if ( i < [pBtnArray count] ) {
for ( int i = 0; i < 48; i++ )
{
CGPoint posLevel;
LevelButton* pBtn;
if ( i >= 0 && i < 24 )
{
int nXX = (i % 4 + 1);
if ( i < [pBtnArray count] )
{
posLevel = ccp( (spMask.position.x - mySize.width / 2) + mySize.width / 5 * nXX,
mySize.height - mySize.height / 7 * (i / 4 + 1));
pBtn = [pBtnArray objectAtIndex:i];
if ( pBtn != nil )
{
[pBtn move:posLevel];
}
}
}
for(int i=0;i<48;i++)
{
cgp-posLevel;
水平按钮*pBtn;
如果(i>=0&&i<24)
{
int nXX=(i%4+1);
如果(i<[pBtnArray count])
{
posLevel=ccp((spMask.position.x-mySize.width/2)+mySize.width/5*nXX,
mySize.height-mySize.height/7*(i/4+1));
pBtn=[pBtnArray objectAtIndex:i];
如果(pBtn!=零)
{
[pBtn移动:posLevel];
}
}
}
使用xcode添加的箭头,如果这些帮助
一旦删除了注释掉的代码,这里就没有多少代码了,所以我不明白XCode抛出了什么问题
如果您能帮助删除此错误,我们将不胜感激!屏幕截图中的代码如下所示
CGRect posLevel;
if (mySize.height < 568) {
posLevel = ...;
}
if (mySize.height >= 568) {
posLevel = ...;
}
[pBtn move:posLevel];
CGRect posLevel;
if (mySize.height < 568) {
posLevel = ...;
} else {
posLevel = ...;
}
[pBtn move:posLevel];