I don’t know if it’s some setting I accidentally ticked, but tell me how to fix it please:
Whenever I create a new Obj-C class, it automatically looks like:
#import <Foundation/Foundation.h>
@interface MathUtilities : NSObject {
**@private**
}
@end
That line is automatically inserted. It never was there before, but something is not adding it. My files also now come with init and dealloc methods. Did something happen? Also, shouldn’t it be importing Cocoa instead of Foundation?
This is XCode 4
There is nothing to fix. XCode is creating stubs for you to fill out your code into. It’s a time saver, thats all. It should be generating a header and implementation stub file for you, which you can extend like so:
Your header file (MathUtilities.h):
Your implementation file (MathUtilities.m) :