0

How can i display a XIB interface on an UIView!Please be simple!

Mateus
  • 2,640
  • 5
  • 44
  • 62

1 Answers1

2

a UIView interface built in a XIB can be displayed by linking that XIB with a UIViewController.

Check out the Apple documentation About Windows and Views.

And you can see how a XIB is set up just by creating a new project in XCode and choosing "Single View Application" as a template. If you're using XCode 4.2, the "MainStoryboard.storyboard" file appears to be the new name for a XIB file.

Which reminds me I should go check out the WWDC session online that talks about this -- and you should too. If you're a registered developer, it's free to check out! My educated guess is that the "Designing User Interfaces for iOS and Mac OS X Apps" session (at https://developer.apple.com/videos/wwdc/2011/?id=110) is the one you want to see.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • Okay. Check out the answers to this StackOverflow question -- especially the one with lots of votes --> http://stackoverflow.com/questions/863321/iphone-how-to-load-a-view-using-a-nib-file-created-with-interface-builder – Michael Dautermann Oct 17 '11 at 05:31
  • Could you create a simple application an send me,just the xib being displayed on the UIView,please!I've already seen all pages about this and they don't helped me much,i don't know where i making a mistake!Please i really need this for now!Just – Mateus Oct 17 '11 at 05:38
  • 1
    Mateus, unfortunately there are no quick fixes for this, this is foundation level stuff that you need to understand and until you read up on it and work on it for a bit its not going to make any sense. I recommend you create a new xcode project of type 'Single View Application' template and read the code in there. – Aron Oct 17 '11 at 05:44