Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-02-2010, 05:18 PM   #1 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 66
Default remove image

im my game, i want to remove an image when two images collide. I have the collision code, but how do I remove an image in runtime?

Thanks
mikelowe is offline   Reply With Quote
Old 01-02-2010, 05:44 PM   #2 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 66
Default

Nevermind. I figured it out

[p1 removeFromSuperView];


EDIT: actually didn't work. I have a score int that goes up when they intersect. when I am in the place that the p1 was in, it keeps going up

Last edited by mikelowe; 01-02-2010 at 05:47 PM.
mikelowe is offline   Reply With Quote
Old 01-02-2010, 06:37 PM   #3 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
Default

If p1 is a UIImageView or other UIveiw, then [p1 removeFromSuperview] should work. (Note lowercase "v" in view.)

Can you clarify this statement? Not sure what you mean: "when I am in the place that the p1 was in, it keeps going up"
__________________

Free Games!
smasher is offline   Reply With Quote
Old 01-03-2010, 06:26 PM   #4 (permalink)
Beast Iphone Developor
 
justill45's Avatar
 
Join Date: Aug 2009
Location: Atlanta, Georgia
Age: 16
Posts: 1,302
Default

Quote:
Originally Posted by smasher View Post
If p1 is a UIImageView or other UIveiw, then [p1 removeFromSuperview] should work. (Note lowercase "v" in view.)

Can you clarify this statement? Not sure what you mean: "when I am in the place that the p1 was in, it keeps going up"
im pretty sure that he means, when they collide, the image looks like it goes away, but if the image that is still there goes where the image that dissapeared used to be, than it acts like its still there
justill45 is offline   Reply With Quote
Reply

Bookmarks

Tags
image, remove, runtime

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 252
23 members and 229 guests
@sandris, ADY, beleg_1998, Dani77, diyora, FAED, fredidf, F_Bryant, iDifferent, JamesCahall, JasonR, mer10, Oral B, prchn4christ, Rudy, smithdale87, Speed, spiderguy84, stekki, tgjorgoski, Touchmint, twerner, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,755
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:08 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0