MBCalendar工具包框架如何在我的项目中添加
我使用了MBCalendar
工具包框架。 并成功添加到我的项目中,但问题是几个月和日期不能显示模拟器。 在本周和年度节目中只有一个顶级酒吧节目。 我附上我的输出快照,请找到这个并显示下面。 我想在UI中成功完成日历节目。 怎么可能请帮忙。
#import "ViewController.h" #import "CalendarKit/CalendarKit.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; CKCalendarView *calendar = [CKCalendarView new]; [calendar setDelegate:self]; [calendar setDataSource:self]; [[self view] addSubview:calendar]; }
按照我的步骤:
第1步:删除你所有与MBCalendar相关的实现。
第2步:在项目中包含CKDemoViewController.h和CKDemoViewController.m文件。
第3步:将您的视图设计类设置为CKDemoViewController。
检查一些文件: https : //github.com/BhadreshKathiriya/MBCalendar
- (IBAction)btnClick:(id)sender { [self presentViewController:[[CKDemoViewController alloc] init] animated:YES completion:nil]; //Or [self.navigationController pushViewController:[[CKDemoViewController alloc] init] animated:YES]; }