Xcode version 5.1.1 does not give you the same options as the book shows when creating the new class. Also, it doesn’t give you the option to set it as a subclass of NSObject.
Any chance I can get some pointers on the correct options to choose when creating a new project?
I chose the “Cocoa Application” option, and on the options screen set the class prefix to BNRPerson. When the class is created though, it gets called BNRPersonAppDelegate.h/.m.
Is this expected? There are also some code differences when I go to add _heightInMeters and _weightInKilos into the header file, hence why I question if I chose the right options to begin with…
After a bit of Googling, I see why the .h and .m files are named BNRPersonAppDelegate.h/.m, but I’m still at a bit of a loss on how to create a Cocoa/Objective-C Class…
Any pointers would be appreciated…
Latest and greatest version of Xcode can’t be all that different.
It looks like you are creating a new project. When you create a new project, you can only enter the name of the project and a class prefix to be used.
If you want to create a new class, do File/New/File…
I’m using Xcode 5.1.1 and everything going fine
recheck what u r doing when recreate the book’s examples
I’m using latest version of Xcode and there are certainly some differences.
To create a new class I use the keyboard shortcut Command + N, as I don’t have the old header toolbar where ‘File’ and other categories were in my older version.
Also, the other notable difference is that I have to select ‘Cocoa Touch’ class rather than the old ‘Objective C’ class if I want to generate both .m and -h files at once.