Objective c 已定义类中的方法不可见

Objective c 已定义类中的方法不可见,objective-c,Objective C,我有一个定义为Schedule.h文件的课程时间表,如图所示 #import <UIKit/UIKit.h> #import "TdCalendarView.h" #import "AppDelegate.h" @interface Schedule : UIView { IBOutlet UIView *schedule; } - (void) calendarTouched:(CFGregorianDate) selectedDate; @end 在另一个类中,

我有一个定义为Schedule.h文件的课程时间表,如图所示

#import <UIKit/UIKit.h>
#import "TdCalendarView.h"
#import "AppDelegate.h"

@interface Schedule : UIView  {
    IBOutlet UIView *schedule;
}

- (void) calendarTouched:(CFGregorianDate) selectedDate;

@end
在另一个类中,我使用以下方法调用calendarTouched:

Schedule *sch = [[Schedule alloc] init];
[sch.calendarTouched:currentSelectDate];
我收到一个生成错误,表示在Schedule类型的对象上找不到“calendarTouched”。我在调用类中有一个导入计划.h

我做了一次清洁,但没有用。为什么它找不到呢

[sch.calendarTouched:currentSelectDate];
这里结合了点语法和括号语法。这应该是:

[sch calendarTouched:currentSelectDate];

您不会在Objective-C中调用这样的方法。请改为:

[sch calendarTouched:currentSelectDate];

真不敢相信!就在我面前,我更清楚。。。非常感谢……鼓手的回答实际上比我的回答晚了29秒,但我们中谁得到了复选标记对我来说并不重要。这是在同一时间内的答案阈值无论如何。
[sch calendarTouched:currentSelectDate];