我正在初始化一个像这样的对象:
Project *Project = [[Project alloc] init];
这是项目类的代码:
项目.h
#import <Foundation/Foundation.h>
@interface Project : NSObject
{
}
@property (nonatomic,assign) int projectID;
@property (nonatomic,strong) NSString *name;
@end
项目.m
#import "Project.h"
@implementation Project
@synthesize projectID, name;
@end
No visible @interface for 'Project' declares the selector 'alloc'
尝试初始化对象时出现错误。我该如何解决这个问题?