diff --git a/JTCalendar/JTCalendarDelegate.h b/JTCalendar/JTCalendarDelegate.h index 9e1348b..6626e24 100644 --- a/JTCalendar/JTCalendarDelegate.h +++ b/JTCalendar/JTCalendarDelegate.h @@ -14,6 +14,7 @@ @class JTCalendarManager; +NS_ASSUME_NONNULL_BEGIN @protocol JTCalendarDelegate @optional @@ -113,3 +114,4 @@ - (void)calendar:(JTCalendarManager *)calendar didTouchDayView:(UIView *)dayView; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/JTCalendarManager.h b/JTCalendar/JTCalendarManager.h index de5624e..210f6f2 100644 --- a/JTCalendar/JTCalendarManager.h +++ b/JTCalendar/JTCalendarManager.h @@ -18,12 +18,13 @@ #import "JTCalendarDelegateManager.h" #import "JTCalendarScrollManager.h" +NS_ASSUME_NONNULL_BEGIN @interface JTCalendarManager : NSObject -@property (nonatomic, weak) id delegate; +@property (nonatomic, weak, nullable) id delegate; -@property (nonatomic, weak) UIView *menuView; -@property (nonatomic, weak) UIScrollView *contentView; +@property (nonatomic, weak, nullable) UIView *menuView; +@property (nonatomic, weak, nullable) UIScrollView *contentView; @property (nonatomic, readonly) JTDateHelper *dateHelper; @property (nonatomic, readonly) JTCalendarSettings *settings; @@ -42,3 +43,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/JTCalendar/JTCalendarSettings.h b/JTCalendar/JTCalendarSettings.h index cabc397..c8d4abd 100644 --- a/JTCalendar/JTCalendarSettings.h +++ b/JTCalendar/JTCalendarSettings.h @@ -13,6 +13,7 @@ typedef NS_ENUM(NSInteger, JTCalendarWeekDayFormat) { JTCalendarWeekDayFormatFull }; +NS_ASSUME_NONNULL_BEGIN @interface JTCalendarSettings : NSObject @@ -38,3 +39,4 @@ typedef NS_ENUM(NSInteger, JTCalendarWeekDayFormat) { - (void)commonInit; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/JTDateHelper.h b/JTCalendar/JTDateHelper.h index 57d57af..2d37f4a 100644 --- a/JTCalendar/JTDateHelper.h +++ b/JTCalendar/JTDateHelper.h @@ -7,21 +7,22 @@ #import +NS_ASSUME_NONNULL_BEGIN @interface JTDateHelper : NSObject - (NSCalendar *)calendar; - (NSDateFormatter *)createDateFormatter; -- (NSDate *)addToDate:(NSDate *)date months:(NSInteger)months; -- (NSDate *)addToDate:(NSDate *)date weeks:(NSInteger)weeks; -- (NSDate *)addToDate:(NSDate *)date days:(NSInteger)days; +- (nullable NSDate *)addToDate:(NSDate *)date months:(NSInteger)months; +- (nullable NSDate *)addToDate:(NSDate *)date weeks:(NSInteger)weeks; +- (nullable NSDate *)addToDate:(NSDate *)date days:(NSInteger)days; // Must be less or equal to 6 - (NSUInteger)numberOfWeeks:(NSDate *)date; -- (NSDate *)firstDayOfMonth:(NSDate *)date; -- (NSDate *)firstWeekDayOfMonth:(NSDate *)date; -- (NSDate *)firstWeekDayOfWeek:(NSDate *)date; +- (nullable NSDate *)firstDayOfMonth:(NSDate *)date; +- (nullable NSDate *)firstWeekDayOfMonth:(NSDate *)date; +- (nullable NSDate *)firstWeekDayOfWeek:(NSDate *)date; - (BOOL)date:(NSDate *)dateA isTheSameMonthThan:(NSDate *)dateB; - (BOOL)date:(NSDate *)dateA isTheSameWeekThan:(NSDate *)dateB; @@ -32,3 +33,4 @@ - (BOOL)date:(NSDate *)date isEqualOrAfter:(NSDate *)startDate andEqualOrBefore:(NSDate *)endDate; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/Managers/JTCalendarDelegateManager.h b/JTCalendar/Managers/JTCalendarDelegateManager.h index 321a343..c9330bf 100644 --- a/JTCalendar/Managers/JTCalendarDelegateManager.h +++ b/JTCalendar/Managers/JTCalendarDelegateManager.h @@ -11,9 +11,10 @@ // Provide a default behavior when no delegate are provided +NS_ASSUME_NONNULL_BEGIN @interface JTCalendarDelegateManager : NSObject -@property (nonatomic, weak) JTCalendarManager *manager; +@property (nonatomic, weak, nullable) JTCalendarManager *manager; // Menu view @@ -46,3 +47,4 @@ - (void)didTouchDayView:(UIView *)dayView; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/Managers/JTCalendarScrollManager.h b/JTCalendar/Managers/JTCalendarScrollManager.h index b50d812..f7310ea 100644 --- a/JTCalendar/Managers/JTCalendarScrollManager.h +++ b/JTCalendar/Managers/JTCalendarScrollManager.h @@ -13,13 +13,13 @@ #import "JTContent.h" // Synchronize JTHorizontalCalendarView and JTCalendarMenuView - +NS_ASSUME_NONNULL_BEGIN @interface JTCalendarScrollManager : NSObject -@property (nonatomic, weak) JTCalendarManager *manager; +@property (nonatomic, weak, nullable) JTCalendarManager *manager; -@property (nonatomic, weak) UIView *menuView; -@property (nonatomic, weak) UIScrollView *horizontalContentView; +@property (nonatomic, weak, nullable) UIView *menuView; +@property (nonatomic, weak, nullable) UIScrollView *horizontalContentView; - (void)setMenuPreviousDate:(NSDate *)previousDate currentDate:(NSDate *)currentDate @@ -29,3 +29,4 @@ - (void)updateHorizontalContentOffset:(CGFloat)percentage; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/Protocols/JTCalendarDay.h b/JTCalendar/Protocols/JTCalendarDay.h index 728b225..0db2cdb 100644 --- a/JTCalendar/Protocols/JTCalendarDay.h +++ b/JTCalendar/Protocols/JTCalendarDay.h @@ -9,6 +9,7 @@ @class JTCalendarManager; +NS_ASSUME_NONNULL_BEGIN @protocol JTCalendarDay - (void)setManager:(JTCalendarManager *)manager; @@ -20,3 +21,4 @@ - (void)setIsFromAnotherMonth:(BOOL)isFromAnotherMonth; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/Protocols/JTCalendarPage.h b/JTCalendar/Protocols/JTCalendarPage.h index c4f946e..60db7cb 100644 --- a/JTCalendar/Protocols/JTCalendarPage.h +++ b/JTCalendar/Protocols/JTCalendarPage.h @@ -9,6 +9,7 @@ @class JTCalendarManager; +NS_ASSUME_NONNULL_BEGIN @protocol JTCalendarPage - (void)setManager:(JTCalendarManager *)manager; @@ -19,3 +20,4 @@ - (void)reload; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/Protocols/JTCalendarWeek.h b/JTCalendar/Protocols/JTCalendarWeek.h index 71a97aa..d954ff0 100644 --- a/JTCalendar/Protocols/JTCalendarWeek.h +++ b/JTCalendar/Protocols/JTCalendarWeek.h @@ -9,6 +9,7 @@ @class JTCalendarManager; +NS_ASSUME_NONNULL_BEGIN @protocol JTCalendarWeek - (void)setManager:(JTCalendarManager *)manager; @@ -17,3 +18,4 @@ - (void)setStartDate:(NSDate *)startDate updateAnotherMonth:(BOOL)enable monthDate:(NSDate *)monthDate; @end +NS_ASSUME_NONNULL_END diff --git a/JTCalendar/Protocols/JTCalendarWeekDay.h b/JTCalendar/Protocols/JTCalendarWeekDay.h index 4bf951d..0beacf2 100644 --- a/JTCalendar/Protocols/JTCalendarWeekDay.h +++ b/JTCalendar/Protocols/JTCalendarWeekDay.h @@ -9,6 +9,7 @@ @class JTCalendarManager; +NS_ASSUME_NONNULL_BEGIN @protocol JTCalendarWeekDay - (void)setManager:(JTCalendarManager *)manager; @@ -16,3 +17,4 @@ - (void)reload; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/Protocols/JTContent.h b/JTCalendar/Protocols/JTContent.h index d37d5dc..c9ada28 100644 --- a/JTCalendar/Protocols/JTContent.h +++ b/JTCalendar/Protocols/JTContent.h @@ -9,6 +9,7 @@ @class JTCalendarManager; +NS_ASSUME_NONNULL_BEGIN @protocol JTContent - (void)setManager:(JTCalendarManager *)manager; @@ -23,3 +24,4 @@ - (void)loadNextPageWithAnimation; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/Protocols/JTMenu.h b/JTCalendar/Protocols/JTMenu.h index 8237751..8c90510 100644 --- a/JTCalendar/Protocols/JTMenu.h +++ b/JTCalendar/Protocols/JTMenu.h @@ -9,6 +9,7 @@ @class JTCalendarManager; +NS_ASSUME_NONNULL_BEGIN @protocol JTMenu - (void)setManager:(JTCalendarManager *)manager; @@ -22,3 +23,4 @@ - (UIScrollView *)scrollView; @end +NS_ASSUME_NONNULL_END diff --git a/JTCalendar/Views/JTCalendarDayView.h b/JTCalendar/Views/JTCalendarDayView.h index 06ace2b..f4207e6 100644 --- a/JTCalendar/Views/JTCalendarDayView.h +++ b/JTCalendar/Views/JTCalendarDayView.h @@ -9,9 +9,10 @@ #import "JTCalendarDay.h" +NS_ASSUME_NONNULL_BEGIN @interface JTCalendarDayView : UIView -@property (nonatomic, weak) JTCalendarManager *manager; +@property (nonatomic, weak, nullable) JTCalendarManager *manager; @property (nonatomic) NSDate *date; @@ -30,3 +31,4 @@ - (void)commonInit; @end +NS_ASSUME_NONNULL_END diff --git a/JTCalendar/Views/JTCalendarMenuView.h b/JTCalendar/Views/JTCalendarMenuView.h index f6dfb9b..cdd46bc 100644 --- a/JTCalendar/Views/JTCalendarMenuView.h +++ b/JTCalendar/Views/JTCalendarMenuView.h @@ -9,9 +9,10 @@ #import "JTMenu.h" +NS_ASSUME_NONNULL_BEGIN @interface JTCalendarMenuView : UIView -@property (nonatomic, weak) JTCalendarManager *manager; +@property (nonatomic, weak, nullable) JTCalendarManager *manager; @property (nonatomic) CGFloat contentRatio; @@ -23,3 +24,4 @@ - (void)commonInit; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/Views/JTCalendarPageView.h b/JTCalendar/Views/JTCalendarPageView.h index 0ba3f30..84b4f43 100644 --- a/JTCalendar/Views/JTCalendarPageView.h +++ b/JTCalendar/Views/JTCalendarPageView.h @@ -9,9 +9,10 @@ #import "JTCalendarPage.h" +NS_ASSUME_NONNULL_BEGIN @interface JTCalendarPageView : UIView -@property (nonatomic, weak) JTCalendarManager *manager; +@property (nonatomic, weak, nullable) JTCalendarManager *manager; @property (nonatomic) NSDate *date; @@ -21,3 +22,4 @@ - (void)commonInit; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/Views/JTCalendarWeekDayView.h b/JTCalendar/Views/JTCalendarWeekDayView.h index b0ea796..0da374a 100644 --- a/JTCalendar/Views/JTCalendarWeekDayView.h +++ b/JTCalendar/Views/JTCalendarWeekDayView.h @@ -9,11 +9,12 @@ #import "JTCalendarWeekDay.h" +NS_ASSUME_NONNULL_BEGIN @interface JTCalendarWeekDayView : UIView -@property (nonatomic, weak) JTCalendarManager *manager; +@property (nonatomic, weak, nullable) JTCalendarManager *manager; -@property (nonatomic, readonly) NSArray *dayViews; +@property (nonatomic, readonly) NSArray *dayViews; /*! * Must be call if override the class @@ -26,3 +27,4 @@ - (void)reload; @end +NS_ASSUME_NONNULL_END diff --git a/JTCalendar/Views/JTCalendarWeekView.h b/JTCalendar/Views/JTCalendarWeekView.h index 35e7497..832e2cb 100644 --- a/JTCalendar/Views/JTCalendarWeekView.h +++ b/JTCalendar/Views/JTCalendarWeekView.h @@ -9,9 +9,10 @@ #import "JTCalendarWeek.h" +NS_ASSUME_NONNULL_BEGIN @interface JTCalendarWeekView : UIView -@property (nonatomic, weak) JTCalendarManager *manager; +@property (nonatomic, weak, nullable) JTCalendarManager *manager; @property (nonatomic, readonly) NSDate *startDate; @@ -21,3 +22,4 @@ - (void)commonInit; @end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/JTCalendar/Views/JTHorizontalCalendarView.h b/JTCalendar/Views/JTHorizontalCalendarView.h index faf8339..b9a79e6 100644 --- a/JTCalendar/Views/JTHorizontalCalendarView.h +++ b/JTCalendar/Views/JTHorizontalCalendarView.h @@ -9,9 +9,10 @@ #import "JTContent.h" +NS_ASSUME_NONNULL_BEGIN @interface JTHorizontalCalendarView : UIScrollView -@property (nonatomic, weak) JTCalendarManager *manager; +@property (nonatomic, weak, nullable) JTCalendarManager *manager; @property (nonatomic) NSDate *date; @@ -21,3 +22,4 @@ - (void)commonInit; @end +NS_ASSUME_NONNULL_END diff --git a/JTCalendar/Views/JTVerticalCalendarView.h b/JTCalendar/Views/JTVerticalCalendarView.h index c70a2d1..70f059f 100644 --- a/JTCalendar/Views/JTVerticalCalendarView.h +++ b/JTCalendar/Views/JTVerticalCalendarView.h @@ -9,9 +9,10 @@ #import "JTContent.h" +NS_ASSUME_NONNULL_BEGIN @interface JTVerticalCalendarView : UIScrollView -@property (nonatomic, weak) JTCalendarManager *manager; +@property (nonatomic, weak, nullable) JTCalendarManager *manager; @property (nonatomic) NSDate *date; @@ -21,3 +22,4 @@ - (void)commonInit; @end +NS_ASSUME_NONNULL_END