From c6d932ba6521d553de17604e155e54dd5a092dcf Mon Sep 17 00:00:00 2001 From: Wenchao Ding Date: Wed, 29 Jun 2016 12:05:45 +0800 Subject: [PATCH] Fix problem #340 Fix problem #340 --- FSCalendar/FSCalendarEventIndicator.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FSCalendar/FSCalendarEventIndicator.m b/FSCalendar/FSCalendarEventIndicator.m index 90bc5c88..40bee8c8 100644 --- a/FSCalendar/FSCalendarEventIndicator.m +++ b/FSCalendar/FSCalendarEventIndicator.m @@ -85,7 +85,7 @@ - (void)layoutSublayersOfLayer:(CALayer *)layer NSArray *colors = (NSArray *)_color; if (colors.count) { UIColor *lastColor = colors.firstObject; - for (int i = 0; i < self.numberOfEvents; i++) { + for (int i = 0; i < self.eventLayers.count; i++) { if (i < colors.count) { lastColor = colors[i]; }