开发者

Problem with creation of uiimageView in arrays

here is my code :

-(void) createImage {


UIImage * image = [UIImage imageNamed:@"abouffer_03.png"];
imageView = [[UIImageView alloc] initWithImage:image];

[imageView setCenter:[self randomPointSquare]];

 [imageViewArray addObject:imageView];

[[self view] addSubview:imageView];

[imageView release];


}

-(void)moveImage{
for(int i=0; i&开发者_如何学JAVAlt; [imageViewArray count];i++){
    UIImageView *imageView = [imageViewArray objectAtIndex:i];
    imageView.center = CGPointMake(imageView.center.x + X, imageView.center.y + Y);
}

I try to use an array in this code but, it doesn't work, indeed I have never used array, and it would be cool if someone could tell me where is my error ;thank you . sorry for my english I'm french :/


You'r missing: imageViewArray = [[NSMutableArray alloc]init];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜