2

我使用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];

}

看起来像这样我的输出

4

1 回答 1

1

按照我的步骤:

第 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];
 }
于 2016-07-16T07:57:28.030 回答