simple question --> button click load image

Discussion in 'iOS Programming' started by mekopolis, Sep 11, 2008.

  1. mekopolis macrumors regular

    Joined:
    Feb 10, 2008
    #1
    this is probably a simple question
    im new to the iphone sdk, and have spent most of my initial time learning sqlite3 and integrating a database

    i probably should of spent that time learning the simple interface design -haha

    my question is

    if i want to have the user click on a button, and it will load an image, the image will take up the full iphone screen, and the user can either tap on the screen or hit a back button
    should i have a new .xib for just that image and have the button load that .xib
    or how do i load it from code from the Main.Xib and when the user taps out of the image, it unloads it and returns to the main.xib where the buttons are

    thanks

    would i use this code, on button click?
    UIImage *image = [UIImage imageNamed:mad:"myimage.png"]
     
  2. Niiro13 macrumors 68000

    Joined:
    Feb 12, 2008
    Location:
    Illinois
    #2
    You can either do it through another xib or right in the main xib...the difference is more of memory management.

    The code you wrote is to make a UIImage, not necessarily the displaying of one...
     
  3. mekopolis thread starter macrumors regular

    Joined:
    Feb 10, 2008
    #3
    so using it on the same view / .xib window

    would i call upon the image to be loaded into the self.view

    or do i need to use a UIImagePickerController

    i've been scanning through countless forums and i think i am just confusing myself even more -lol-

    thanks for your help
     
  4. Niiro13 macrumors 68000

    Joined:
    Feb 12, 2008
    Location:
    Illinois
    #4
    Well, I can definitely solve your problem...I'm just not sure what's under the NDA...(surprising that no one posted in my other thread asking about it)
     
  5. Ron C macrumors member

    Joined:
    Jul 18, 2008
    Location:
    Chicago-area
    #5

Share This Page