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

iphonejudy

macrumors 6502
Original poster
Sep 12, 2008
301
1
Hi all,

I want to display the image in iphone when button click.

Can anybody please tellme?

1.What is the code i have to write to display the image?

2.In connection Inspector what are the things i need to do?

Thanks
judy
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Use UIImageView to display an image. Create an instance of one, add it to your view as a subview and give it an image. You could also draw it yourself in a custom view but that's just unnecessary work.
 

mekopolis

macrumors regular
Feb 10, 2008
152
0
so you would use 1 UIImageView Controller to display an image when the button is clicked, and then how do you unload that image? so it doesn't clog up the memory?

and if the user clicked on another button, for another image, can it load into the same UIImageView Controller?
 

iphonejudy

macrumors 6502
Original poster
Sep 12, 2008
301
1
About display an image

HI,


Thanks for your reply.

I am new to the iphone.

So I need a code for display image when button click,

I create UIImageView to display an image,and i have a button also.

can anybody please tell me the steps and code for display an image?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.