From 767695f6e1dfd333bbd0da08474882e91e0e1991 Mon Sep 17 00:00:00 2001 From: dingwenchao Date: Tue, 10 Nov 2015 10:50:50 +0800 Subject: [PATCH] Not necessary to strong-holding a shared instance Not necessary to strong-holding a shared instance --- FSCalendar/FSCalendar.m | 2 +- FSCalendar/FSCalendarHeader.m | 3 +-- FSCalendar/FSCalendarStickyHeader.m | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/FSCalendar/FSCalendar.m b/FSCalendar/FSCalendar.m index 0ca0d3f..aa20896 100644 --- a/FSCalendar/FSCalendar.m +++ b/FSCalendar/FSCalendar.m @@ -65,7 +65,7 @@ @property (weak , nonatomic) FSCalendarHeader *header; @property (weak , nonatomic) FSCalendarHeaderTouchDeliver *deliver; -@property (strong, nonatomic) NSCalendar *calendar; +@property (weak , nonatomic) NSCalendar *calendar; @property (assign, nonatomic) BOOL ibEditing; @property (assign, nonatomic) BOOL needsAdjustingMonthPosition; diff --git a/FSCalendar/FSCalendarHeader.m b/FSCalendar/FSCalendarHeader.m index db1bd0f..5093a24 100644 --- a/FSCalendar/FSCalendarHeader.m +++ b/FSCalendar/FSCalendarHeader.m @@ -15,8 +15,7 @@ @interface FSCalendarHeader () -@property (strong, nonatomic) NSDateFormatter *dateFormatter; - +@property (weak, nonatomic) NSDateFormatter *dateFormatter; @property (weak, nonatomic) UICollectionViewFlowLayout *collectionViewFlowLayout; @property (assign, nonatomic) BOOL needsAdjustingMonthPosition; diff --git a/FSCalendar/FSCalendarStickyHeader.m b/FSCalendar/FSCalendarStickyHeader.m index 8417eec..2eb7eb8 100644 --- a/FSCalendar/FSCalendarStickyHeader.m +++ b/FSCalendar/FSCalendarStickyHeader.m @@ -18,7 +18,7 @@ @property (weak, nonatomic) UIView *contentView; @property (weak, nonatomic) UIView *separator; -@property (strong, nonatomic) NSDateFormatter *dateFormatter; +@property (weak, nonatomic) NSDateFormatter *dateFormatter; @property (assign, nonatomic) BOOL needsReloadingAppearance; @property (assign, nonatomic) BOOL needsAdjustingFrames; @@ -35,9 +35,9 @@ self = [super initWithFrame:frame]; if (self) { - self.dateFormatter = [NSDateFormatter fs_sharedDateFormatter]; - self.needsReloadingAppearance = YES; - self.needsAdjustingFrames = YES; + _dateFormatter = [NSDateFormatter fs_sharedDateFormatter]; + _needsReloadingAppearance = YES; + _needsAdjustingFrames = YES; UIView *view = [[UIView alloc] initWithFrame:CGRectZero]; view.backgroundColor = [UIColor clearColor];