。H
#import <Foundation/Foundation.h>
#import "Person.h"
extern NSString *const kRemindersWeekly;
extern NSString *const kRemindersDaily;
@interface Reminders : NSObject
+(void)setRemindersForPerson: (Person*) person;
+(void)setEightDayReminder;
@end
.m
#import "Reminders.h"
@implementation Reminders
NSString *const kRemindersWeekly = @"WEEKLY";
NSString *const kRemindersDaily = @"DAILY";
+ (void) setRemindersForPerson: (Person*) person
{
// some code
}
+(void)setEightDayReminder
{
// some more code
}
@end
当我打电话时:
[Reminders setRemindersForPerson: p];
这总是很好。当我打电话时:
[Reminders setEightDayReminder];
我得到:
+[Reminders setEightDayReminder]: unrecognized selector sent to class 0xe1b58
此外,[Reminders setRemindersForPerson:];
通话[Person setEightDayReminder]
没有任何问题。构建良好,并且命令单击 XCode 中的功能会显示它。我认为一切都井井有条,因为它将我带到了适当的地方。
一定是遗漏了什么明显的东西?!把我的头发拉出来。