A.Kumawat
A.Kumawat

Reputation: 103

MBCalendar kit framework how to add in my project

I used MBCalendar kit framework. and successfully added in my project, but problem is that months and dates cant show simulator. only one top bar show in this weeks and year show. I attached my output snap shot please find this and show bellow. I want to successfully calendar show in UI. how it possible please help.

#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];

}

Look like this my output

Upvotes: 2

Views: 221

Answers (1)

Bhadresh Kathiriya
Bhadresh Kathiriya

Reputation: 3244

Follow my step:

Step 1: remove you are implement all related to MBCalendar.

Step 2: include CKDemoViewController.h & CKDemoViewController.m file in your project.

Step 3: set your view design class to CKDemoViewController.

check some file: 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];
 }

Upvotes: 1

Related Questions