Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 28, 2012, 09:00 PM   #1
Narcs
macrumors newbie
 
Join Date: Jan 2012
Temporarily Spawning UIImageView

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 OllyW; Jan 29, 2012 at 03:34 AM. Reason: Code tags
Narcs is offline   0 Reply With Quote
Old Jan 28, 2012, 09:11 PM   #2
robvas
macrumors 68000
 
Join Date: Mar 2009
Location: USA
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 OllyW; Jan 29, 2012 at 03:35 AM. Reason: Code tags
robvas is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
game, iphone, objective c, uiimageview

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: UIScrollView does not scroll a UIImageView Tex-Twil iPhone/iPad Programming 4 Nov 20, 2013 06:57 AM
UIImageView Transition alaahershy iPhone/iPad Programming 5 Sep 10, 2013 04:28 PM
UIImageView problem flashyx iPhone/iPad Programming 1 Mar 2, 2013 04:10 AM
How many processes are your new iMacs spawning a day Kadath iMac 4 Feb 19, 2013 03:12 PM
Reordering UIImageView layers xArtx iPhone/iPad Programming 9 Jan 16, 2013 06:21 AM

Forum Jump

All times are GMT -5. The time now is 01:35 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC