我想EditField在我的BlackBerry应用程序中设置一个高度和宽度.
我正在创建一个iphone应用程序,我需要在其中创建25个图像的网格视图.我这样做是通过在一个数组中拍摄25张图像,并通过使用for循环显示它们,方法是在下面的代码中更改x轴和y轴的尺寸:
for(int i=0; i<25; i++)
{
if(i>0)
{
if(i%5==0)
{
xaxis=30;
yaxis=yaxis+35;
}
}
iconButton[i]=[UIButton buttonWithType:UIButtonTypeRoundedRect];
iconButton[i].frame=CGRectMake(xaxis, yaxis, 50, 30);
[iconButton[i] setBackgroundImage:[iconArray objectAtIndex:i] forState:UIControlStateNormal];
[iconButton[i] addTarget:self action:@selector(changeImage:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:iconButton[i]];
xaxis=xaxis+55;
}
Run Code Online (Sandbox Code Playgroud)
它工作正常,但我有40张图像,我希望每次应用程序启动它应该从25张图像中随机选取25张图像.
我该怎么做,请帮帮我.
非常感谢您的帮助.关心iPhoneDeveloper11
我开发了Android游戏应用程序,我想将其上传到Android Market.这是什么程序?