bntzio
bntzio

Reputation: 1324

Changes in xcode 4.4.1 - Create the ViewController.xib?

Well, I'm currently reading a book about iOS programming, but with the changes in xcode related to the MainWindow.xib file I'm lost, I can't follow the book due the changes in xocde and the directions of the book.

The book says:

3. Xcode should create the project. In the Groups & Files pane, expand the Classes and Resources folders and click on MainWindow.xib. Select View | Utilities | Object Attributes from the main menu. Select View | Show Debugger Area from the main menu. You now have all of the main areas of the Xcode interface visible (Figure 1-7). Familiarize yourself with the layout of information and controls.

For this I needed to create for my own the MainWindow.xib, well, I created it.

Next step is the following: (here's where I get lost)

4. Click QuickStartViewController.xib to open it in Interface Builder. Starting with Xcode 4, the Interface Builder is now built in, so you can edit your interface directly in the project window.

Here's the Figure 1-8. A view’s canvas in Interface Builder: (Sorry but because I'm new user I can't post images yet) So here's the link in imgur.

https://i.sstatic.net/dkbzG.jpg

5. You should see a canvas like the one shown in Figure 1-8. Click the View button in the middle of the window (square with a dotted outline) and a view will appear on the canvas (Figure 1-9).

Here's the Figure 1-9. Canvas with the view displayed

https://i.sstatic.net/LCb7o.jpg

Figure 1-9. Canvas with the view displayed

Well, what do I do here? With the changes of xcode and the reference of the book I get lost, the only thing I create was the MainWindow.xib file, but, what is ViewController.xib?

Do I need to create it? or is it in the files when creating the project (maybe as a different name), but when I search in the Navigation Area (search box) "ViewController.xib" nothing appears, and when I type "ViewController" (without the .xib) it appears two files, "ViewController.h" and "ViewController.m" .

I don't understand that thing of ViewController.xib, where is it? Or do I need to create it? I'm lost, can someone explain me?

Thanks!

Upvotes: 2

Views: 2166

Answers (2)

george
george

Reputation: 11

file - new file - objective c class

remember to check (with XIB interface)

Upvotes: 1

agoncharov
agoncharov

Reputation: 942

.xib files is for visual view of application pages. If your app consists from one page you shouldn't create more than one .xib (if you haven't localization). If you want to navigate between controllers you should create another. Of course you can do it without Interface Builder, but for start it is very useful.

Upvotes: 2

Related Questions