MBCalendar 套件框架如何添加到我的项目中

MBCalendar kit framework how to add in my project

我使用了 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 步:将视图设计 class 设置为 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];
 }