Need some help with .XIB files

Discussion in 'iOS Programming' started by cartwa, Jun 17, 2009.

  1. cartwa macrumors newbie

    cartwa

    Joined:
    Jun 17, 2009
    Location:
    Minneapolis
    #1
    My programmer has left for two weeks and he made an error that I need to change. I have 3 NIB files - viewone.xib, viewtwo.xib and viewthree.xib that all point to the same PNG. I need a separate PNG for each .xib

    Can anyone tell me how I can change the PNG for the xibs point to?
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    One at a time, do this:
    • Double-click each of the .xib files to open them in Interface Builder. You will probably easily spot the desired images in windows that look like mockups of your interface. (If you don't, let us know and we can try to help you find them another way).
    • Click on each image to select it (they will be noted as UIImageView).
    • Open the attributes inspector (Tools > Attributes Inspector)
    • At the top of the inspector, is a drop-down that lets you select the image for the image view, from previously imported images.
    • Choose the desired image you want from this dropdown. (If you haven't added the images you want to your project yet, again, let us know. We'll see what we can do.)
    • Save the .xib in Interface Builder
    • Rebuild your project
    • Profit! :D
     
  3. cartwa thread starter macrumors newbie

    cartwa

    Joined:
    Jun 17, 2009
    Location:
    Minneapolis

Share This Page