I’m using this to display a image randomly on the iPhone screen.
-(IBAction)gunshot {
UIImageView *img = [[UIImageView alloc]
initWithImage:[UIImage imageNamed:@"gunshot.png"]];
img.frame = CGRectMake(0, 0, 85, 63);
img.center = CGPointMake(random() % 350, random() % 350);
[self.view addSubview:img];
[img release];
}
Now my “problem” is to remove the images that pops-up on the screen after lets say 2 sec.
Hope you can help me and thanks in advance.
1 Answer