About display image

Discussion in 'iOS Programming' started by iphonejudy, Sep 13, 2008.

  1. iphonejudy macrumors 6502


    Sep 12, 2008
    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?

  2. kainjow Moderator emeritus


    Jun 15, 2000
    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.
  3. mekopolis macrumors regular

    Feb 10, 2008
    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?
  4. iphonejudy thread starter macrumors 6502


    Sep 12, 2008
    About display an image


    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?

Share This Page