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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
call method from subclass of uiimageview sregorcinimod iPhone/iPad Programming 3 Apr 22, 2011 11:54 PM
UIImageView Wont Display Image CosmicChild87 iPhone/iPad Programming 12 Nov 5, 2010 03:54 PM
Net 'could spawn seedy alternatives' iGav Current Events 18 Jan 30, 2004 03:36 PM
Triangle spawns new window j33pd0g Mac OS X 10.3 (Panther) Discussion 2 Oct 28, 2003 07:05 PM


All times are GMT -5. The time now is 05:33 PM.

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

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