No UIViewController Subclass in XCODE

Discussion in 'iOS Programming' started by Mork, Apr 10, 2012.

  1. Mork macrumors 6502

    Joined:
    Jan 9, 2009
    #1
    I'm working though the "Teach yourself ios 5 programming in 24 hours".

    In hour 11, when adding a new View Controller class, the author references the "+" button at the bottom left of the XCODE IDE. He then selects IOS in the top left and Cocoa Touch.

    Now, on his screenshot there's a UIViewController Subclass icon shown in the right list of icons, but on my xcode (4.3.2), there isn't.

    My icon list has these icons:

    1. Objective-C class

    2. Objective-C category

    3. Objective-C class extension

    4. Objective-C protocol

    5. Objective-C test case

    I tried the "Objective C-class extension" -- which looked like the closest to what he had -- and then filled in the name of the class and picked "UIViewController".

    I then saved this new view set up in to the main project folder (all I saw get created was a '.h.' file.

    However, when I then add a view controller to the form, and go into the identity inspector, I do not see the class name I added in the subclass step above like the author does in his Figure 11-17.

    Something is missing here.

    Is there a new way to do what's in the "current" book that describes this?

    Thanks in advance.

    - m
     
  2. cMacSW macrumors regular

    Joined:
    Mar 20, 2006
    #2
    Select 1. Objective-C class then in one of the next screens is a drop down
    to specify the class would would like to subclass
     
  3. Mork thread starter macrumors 6502

    Joined:
    Jan 9, 2009
    #3
    Yes, that was it.

    Thank you very much! :)

    It's amazing how quickly things change from books that have only been out for a few months.

    - m
     
  4. cMacSW macrumors regular

    Joined:
    Mar 20, 2006
    #4
    Happy to help. That was always a source of frustration for me when trying to follow an example.
     
  5. Mork thread starter macrumors 6502

    Joined:
    Jan 9, 2009
    #5
    Agreed. Thanks again.

    - m
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    Which edition are you using? When was it published? The 3rd edition of that book was published January 9, 2012 and covers Xcode 4.2+.
     
  7. Mork thread starter macrumors 6502

    Joined:
    Jan 9, 2009
    #7
    The one that came out in 2012 for XCODE 4.2.

    ISBN-13: 978-0-672-33576-1
    ISBN-10: 0-672-33576-X

    I guess something already changed in 4.3 or there's a screenshot error (which I doubt based on the fantastic quality of this book).

    - m
     

Share This Page