Skip to content

Commit

Permalink
fix background color
Browse files Browse the repository at this point in the history
  • Loading branch information
gyetvan-andras committed Mar 11, 2015
1 parent 87f392a commit 5d1af5d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions MLCalendarSample/MLCalendarView.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "MLCalendarView.h"
#import "MLCalendarCell.h"
#import "MLCalendarBackground.h"

@interface MLCalendarView ()

Expand Down Expand Up @@ -45,6 +46,12 @@ + (BOOL) isSameDate:(NSDate*)d1 date:(NSDate*)d2 {
}
}

//- (void) setBackgroundColor:(NSColor *)backgroundColor {
// _backgroundColor = backgroundColor;
// MLCalendarBackground* bv = (MLCalendarBackground*)self.view;
// bv.backgroundColor = backgroundColor;
//}

- (instancetype) init {
self = [super initWithNibName:@"MLCalendarView" bundle:[NSBundle bundleForClass:[self class]]];
if (self != nil) {
Expand Down Expand Up @@ -75,6 +82,12 @@ - (void) commonInit {
_date = [NSDate date];
}

//- (void) setBackgroundColor:(NSColor *)backgroundColor {
// _backgroundColor = backgroundColor;
// MLCalendarBackground* bv = (MLCalendarBackground*)self.view;
// bv.backgroundColor = backgroundColor;
//}

- (void)viewDidLoad {
[super viewDidLoad];
self.dayLabels = [NSMutableArray array];
Expand Down Expand Up @@ -103,6 +116,8 @@ - (void)viewDidLoad {
tf.stringValue = day;
}
// self.date = [NSDate date];
MLCalendarBackground* bv = (MLCalendarBackground*)self.view;
bv.backgroundColor = self.backgroundColor;
[self layoutCalendar];
}

Expand Down

0 comments on commit 5d1af5d

Please sign in to comment.