Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

freeme007

macrumors regular
Original poster
Sep 21, 2008
147
0
Hi

I've just updated the Xcode to the latest version and it appears they have changed the name for all their default templates. Currently, I'm still new to this xcode IDE and doing exercises by following a book that I bought from Amazon. The instruction said that I need to use a View-Based Application Template and when I look at all the templates, I don't see it, Anyone know which template is the View-Based template in Xcode 4.2?
 
It's now called "Single View Application".

But, as always, if your book is based on Xcode 3, I suggest installing that alongside Xcode 4 and using that as you work through the book. That will eliminate much of the confusion (at least in regards to the differences between Xcodes).
 
Thanks! Actually I'm using the Beginning iPhone 4 Development Exploring the iOS SDK by Dave, Jack and Jeff. Also, When I add an empty .XIB file in the "Single View Application" How come it does not come with a "Window" or a "View" ? I'm stucked on adding a Table View Cell to the newly added Empty .Xib file.
 
Thanks! Actually I'm using the Beginning iPhone 4 Development Exploring the iOS SDK by Dave, Jack and Jeff.
Ah, continue on then. Just be aware that there may be some differences even between Xcode 4.0 and 4.2.

Also, When I add an empty .XIB file in the "Single View Application" How come it does not come with a "Window" or a "View" ?
It doesn't come with anything because it's empty. Hence, the name. :)

I'm stucked on adding a Table View Cell to the newly added Empty .Xib file.
You should be able to drag a View from the Object library into the XIB. Or did you mean something else? I'm not entirely clear what your issue is here. Care to elaborate?
 
Ah, continue on then. Just be aware that there may be some differences even between Xcode 4.0 and 4.2.


It doesn't come with anything because it's empty. Hence, the name. :)


You should be able to drag a View from the Object library into the XIB. Or did you mean something else? I'm not entirely clear what your issue is here. Care to elaborate?

Here's what I did. I dragged a view onto the xib file first and then dragged a Table View Cell from the library onto the View and when I try to connect from File Owner to the Table View Cell for IBOutlet, it won't let me connect.
 
Here's what I did. I dragged a view onto the xib file first and then dragged a Table View Cell from the library onto the View and when I try to connect from File Owner to the Table View Cell for IBOutlet, it won't let me connect.
Are you trying to create a custom table view cell? If so, no need to drag a View into your XIB; just drag the TableViewCell.
 
Are you trying to create a custom table view cell? If so, no need to drag a View into your XIB; just drag the TableViewCell.

Yea, Like you said I just dragged a TableViewCell to the xib without the view and when I try to connect from File Owner to Table View Cell, it won't let me connect.
 
Thanks, but still it won't let me connected. I'm so lost with the templates without MainWindow.xib

If you don't have MainWindow.xib, then you've created a Storyboard project. This is not what you want this stage. Start again, and this time when you create the project, untick "Use Storyboard".

You may want to untick "Use Automatic Reference Counting" as well. This is another new feature of XCode 4.2 which will complicate following along with your book.
 
How about the other templates in 4.2? Can anybody tell me?
I would rather using Xcode 4.1 than the complicated 4.2, but my 4.1 crashes a lot. !@#%
 
For ex, it could be "Table View". Can u help me with all the templates arrive in xcode 4.1?
BTW I study 4.1 at my iOS dev class, but im using OSX Lion(hackintosh) with 4.2 n no similar templates between them. Dont even suggest me 4.1, i 've try to installed all the 4.1 setups. Things never get better except stupid crashes.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.