Finding Template in Xcode 4.2

Discussion in 'iOS Programming' started by freeme007, Oct 20, 2011.

  1. freeme007 macrumors regular

    Joined:
    Sep 21, 2008
    #1
    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?
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #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).
     
  3. freeme007 thread starter macrumors regular

    Joined:
    Sep 21, 2008
    #3
    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.
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    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?
     
  5. freeme007 thread starter macrumors regular

    Joined:
    Sep 21, 2008
    #5
    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.
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    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.
     
  7. freeme007 thread starter macrumors regular

    Joined:
    Sep 21, 2008
    #7
    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.
     
  8. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #8
    What's the outlet in the header file look like?
     
  9. freeme007, Oct 25, 2011
    Last edited by a moderator: Oct 25, 2011

    freeme007 thread starter macrumors regular

    Joined:
    Sep 21, 2008
    #9
    Code:
    UITableViewCell *tvCelll;
    
    @property (nonatomic, retain) IBOutlet UITableViewCell *tvCell;
     
  10. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #10
    You have an extra l in your ivar.
     
  11. freeme007 thread starter macrumors regular

    Joined:
    Sep 21, 2008
    #11
    Thanks, but still it won't let me connected. I'm so lost with the templates without MainWindow.xib
     
  12. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #12
    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.
     
  13. wildlife92 macrumors newbie

    Joined:
    Oct 28, 2011
    #13
    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. !@#%
     
  14. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #14
    What else do you want to know about the other templates?
     
  15. wildlife92 macrumors newbie

    Joined:
    Oct 28, 2011
    #15
    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.
     

Share This Page