[英]iOS - integrate Kal library in xcode 6 errors
I Work with xCode 6 how can i integrate Kal calendar library to my project 我使用xCode 6如何将Kal日历库集成到我的项目中
I follow instructions on Integrating Kal into Your Project
我遵循有关
Integrating Kal into Your Project
its fine with first steps , but i find problem in integrating to my View 第一步就可以了,但是我发现集成到View时遇到了问题
here what I do : 1- I create property of kalViewController and connected to my View 这是我的工作:1-创建kalViewController的属性并连接到我的View
@property (nonatomic, weak) IBOutlet KalViewController *kal;
kal.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Today", @"") style:UIBarButtonItemStyleBordered target:self action:@selector(showAndSelectToday)];
kal.delegate = self;
dataSource = [[EventKitDataSource alloc] init];
kal.dataSource = dataSource;
[self.navigationController pushViewController:_calendarView animated:YES];
but i got errors i cant fix it 但是我有错误我无法解决
Undeclared selector (showAndSelectToday)
assigning to id <UItableViewdelegate > from incompatible type calendar * const _ strong
and some other error 和其他一些错误
any one can help me 任何人都可以帮助我
i figure why this problem happen 我知道为什么这个问题发生
For 对于
Undeclared selector (showAndSelectToday) Error
未声明的选择器(showAndSelectToday)错误
the answer add to your class this method 答案将此方法添加到您的班级
- (void)showAndSelectToday
{
[kal showAndSelectDate:[NSDate date]];
}
For 对于
assigning to id from incompatible type calendar * const _ strong Error
从不兼容的类型日历分配给ID * const _ strong错误
this error appear when I use kal.delegate = self;
当我使用
kal.delegate = self;
时出现此错误kal.delegate = self;
in yourclass.h file add UITableViewDelegate 在yourclass.h文件中添加UITableViewDelegate
For me its Calendar.h 对我来说,它的Calendar.h
@interface Calendar : UIViewController< UITableViewDelegate >
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.