Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Narcs

macrumors newbie
Original poster
Jan 19, 2012
10
0
I have a UIImageView called hitBox. And an IBAction called hit. What I want to do is temporarily spawn the hitBox UIImageView hitBox for a fractions of a second.

Code:
-(IBAction)hit{
here is where i temporarily want to spawn hitBox
}

Thanks :)
 
Last edited by a moderator:
Well, you could add a new one by doing something like:

Code:
UIImageView *hitbox = [[UIImageView alloc] initWithImage:hitboxImage];
[self.view addSubview:hitbox];
[hitbox setFrame:CGRectMake(x,y,hitboxHorizSize, hitboxVertSize)];
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.