Discard deprecated properties and functions.
This commit is contained in:
parent
09850d2df5
commit
eebc82594d
|
|
@ -153,15 +153,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
*/
|
||||
- (void)calendarCurrentPageDidChange:(FSCalendar *)calendar;
|
||||
|
||||
/**
|
||||
These functions are deprecated
|
||||
*/
|
||||
- (void)calendarCurrentScopeWillChange:(FSCalendar *)calendar animated:(BOOL)animated FSCalendarDeprecated(-calendar:boundingRectWillChange:animated:);
|
||||
- (void)calendarCurrentMonthDidChange:(FSCalendar *)calendar FSCalendarDeprecated(-calendarCurrentPageDidChange:);
|
||||
- (BOOL)calendar:(FSCalendar *)calendar shouldSelectDate:(NSDate *)date FSCalendarDeprecated(-calendar:shouldSelectDate:atMonthPosition:);- (void)calendar:(FSCalendar *)calendar didSelectDate:(NSDate *)date FSCalendarDeprecated(-calendar:didSelectDate:atMonthPosition:);
|
||||
- (BOOL)calendar:(FSCalendar *)calendar shouldDeselectDate:(NSDate *)date FSCalendarDeprecated(-calendar:shouldDeselectDate:atMonthPosition:);
|
||||
- (void)calendar:(FSCalendar *)calendar didDeselectDate:(NSDate *)date FSCalendarDeprecated(-calendar:didDeselectDate:atMonthPosition:);
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
|
|
@ -249,14 +240,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
*/
|
||||
- (CGFloat)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance borderRadiusForDate:(NSDate *)date;
|
||||
|
||||
/**
|
||||
* These functions are deprecated
|
||||
*/
|
||||
- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance fillColorForDate:(NSDate *)date FSCalendarDeprecated(-calendar:appearance:fillDefaultColorForDate:);
|
||||
- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance selectionColorForDate:(NSDate *)date FSCalendarDeprecated(-calendar:appearance:fillSelectionColorForDate:);
|
||||
- (nullable UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance eventColorForDate:(NSDate *)date FSCalendarDeprecated(-calendar:appearance:eventDefaultColorsForDate:);
|
||||
- (nullable NSArray *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance eventColorsForDate:(NSDate *)date FSCalendarDeprecated(-calendar:appearance:eventDefaultColorsForDate:);
|
||||
- (FSCalendarCellShape)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance cellShapeForDate:(NSDate *)date FSCalendarDeprecated(-calendar:appearance:borderRadiusForDate:);
|
||||
@end
|
||||
|
||||
#pragma mark - Primary
|
||||
|
|
@ -393,22 +376,6 @@ IB_DESIGNABLE
|
|||
*/
|
||||
@property (assign, nonatomic) IBInspectable BOOL scrollEnabled;
|
||||
|
||||
/**
|
||||
A Boolean value that determines whether the calendar should show a handle for control the scope. Default is NO;
|
||||
|
||||
@deprecated Use -handleScopeGesture: instead
|
||||
|
||||
e.g.
|
||||
|
||||
UIPanGestureRecognizer *scopeGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self.calendar action:@selector(handleScopeGesture:)];
|
||||
scopeGesture.delegate = ...
|
||||
[anyOtherView addGestureRecognizer:scopeGesture];
|
||||
|
||||
@see FSCalendarScopeExample
|
||||
|
||||
*/
|
||||
@property (assign, nonatomic) IBInspectable BOOL showsScopeHandle FSCalendarDeprecated(handleScopeGesture:);
|
||||
|
||||
/**
|
||||
The row height of the calendar if paging enabled is NO.;
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -217,20 +217,5 @@ typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
|
|||
|
||||
@end
|
||||
|
||||
/**
|
||||
* These functions and attributes are deprecated.
|
||||
*/
|
||||
@interface FSCalendarAppearance (Deprecated)
|
||||
|
||||
@property (assign, nonatomic) BOOL useVeryShortWeekdaySymbols FSCalendarDeprecated('caseOptions');
|
||||
@property (assign, nonatomic) CGFloat titleVerticalOffset FSCalendarDeprecated('titleOffset');
|
||||
@property (assign, nonatomic) CGFloat subtitleVerticalOffset FSCalendarDeprecated('subtitleOffset');
|
||||
@property (strong, nonatomic) UIColor *eventColor FSCalendarDeprecated('eventDefaultColor');
|
||||
@property (assign, nonatomic) FSCalendarCellShape cellShape FSCalendarDeprecated('borderRadius');
|
||||
@property (assign, nonatomic) BOOL adjustsFontSizeToFitContentSize DEPRECATED_MSG_ATTRIBUTE("The attribute \'adjustsFontSizeToFitContentSize\' is not neccesary anymore.");
|
||||
- (void)invalidateAppearance FSCalendarDeprecated('FSCalendar setNeedsConfigureAppearance');
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -480,16 +480,6 @@
|
|||
return self.eventDefaultColor;
|
||||
}
|
||||
|
||||
- (void)setCellShape:(FSCalendarCellShape)cellShape
|
||||
{
|
||||
self.borderRadius = 1-cellShape;
|
||||
}
|
||||
|
||||
- (FSCalendarCellShape)cellShape
|
||||
{
|
||||
return self.borderRadius==1.0?FSCalendarCellShapeCircle:FSCalendarCellShapeRectangle;
|
||||
}
|
||||
|
||||
- (void)setTitleTextSize:(CGFloat)titleTextSize
|
||||
{
|
||||
self.titleFont = [UIFont fontWithName:self.titleFont.fontName size:titleTextSize];
|
||||
|
|
@ -515,9 +505,5 @@
|
|||
[self.calendar configureAppearance];
|
||||
}
|
||||
|
||||
- (void)setAdjustsFontSizeToFitContentSize:(BOOL)adjustsFontSizeToFitContentSize {}
|
||||
- (BOOL)adjustsFontSizeToFitContentSize { return YES; }
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ CG_EXTERN CGFloat const FSCalendarStandardSubtitleTextSize;
|
|||
CG_EXTERN CGFloat const FSCalendarStandardWeekdayTextSize;
|
||||
CG_EXTERN CGFloat const FSCalendarStandardHeaderTextSize;
|
||||
CG_EXTERN CGFloat const FSCalendarMaximumEventDotDiameter;
|
||||
CG_EXTERN CGFloat const FSCalendarStandardScopeHandleHeight;
|
||||
|
||||
UIKIT_EXTERN NSInteger const FSCalendarDefaultHourComponent;
|
||||
|
||||
|
|
@ -51,7 +50,6 @@ CG_EXTERN CGSize const CGSizeAutomatic;
|
|||
|
||||
#define FSCalendarStandardLineColor [[UIColor lightGrayColor] colorWithAlphaComponent:0.30]
|
||||
#define FSCalendarStandardSeparatorColor [[UIColor lightGrayColor] colorWithAlphaComponent:0.60]
|
||||
#define FSCalendarStandardScopeHandleColor [[UIColor lightGrayColor] colorWithAlphaComponent:0.50]
|
||||
|
||||
#define FSColorRGBA(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
|
||||
#define FSCalendarInAppExtension [[[NSBundle mainBundle] bundlePath] hasSuffix:@".appex"]
|
||||
|
|
@ -73,18 +71,6 @@ CG_EXTERN CGSize const CGSizeAutomatic;
|
|||
|
||||
#define FSCalendarDeprecated(instead) DEPRECATED_MSG_ATTRIBUTE(" Use " # instead " instead")
|
||||
|
||||
FSCalendarDeprecated('borderRadius')
|
||||
typedef NS_ENUM(NSUInteger, FSCalendarCellShape) {
|
||||
FSCalendarCellShapeCircle = 0,
|
||||
FSCalendarCellShapeRectangle = 1
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, FSCalendarUnit) {
|
||||
FSCalendarUnitMonth = NSCalendarUnitMonth,
|
||||
FSCalendarUnitWeekOfYear = NSCalendarUnitWeekOfYear,
|
||||
FSCalendarUnitDay = NSCalendarUnitDay
|
||||
};
|
||||
|
||||
static inline void FSCalendarSliceCake(CGFloat cake, NSInteger count, CGFloat *pieces) {
|
||||
CGFloat total = cake;
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ CGFloat const FSCalendarStandardSubtitleTextSize = 10;
|
|||
CGFloat const FSCalendarStandardWeekdayTextSize = 14;
|
||||
CGFloat const FSCalendarStandardHeaderTextSize = 16.5;
|
||||
CGFloat const FSCalendarMaximumEventDotDiameter = 4.8;
|
||||
CGFloat const FSCalendarStandardScopeHandleHeight = 26;
|
||||
|
||||
NSInteger const FSCalendarDefaultHourComponent = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,12 @@
|
|||
|
||||
#import "FSCalendarDelegationFactory.h"
|
||||
|
||||
#define FSCalendarSelectorEntry(SEL1,SEL2) NSStringFromSelector(@selector(SEL1)):NSStringFromSelector(@selector(SEL2))
|
||||
|
||||
@implementation FSCalendarDelegationFactory
|
||||
|
||||
+ (FSCalendarDelegationProxy *)dataSourceProxy
|
||||
{
|
||||
FSCalendarDelegationProxy *delegation = [[FSCalendarDelegationProxy alloc] init];
|
||||
delegation.protocol = @protocol(FSCalendarDataSource);
|
||||
delegation.deprecations = @{FSCalendarSelectorEntry(calendar:numberOfEventsForDate:, calendar:hasEventForDate:)};
|
||||
return delegation;
|
||||
}
|
||||
|
||||
|
|
@ -24,13 +21,6 @@
|
|||
{
|
||||
FSCalendarDelegationProxy *delegation = [[FSCalendarDelegationProxy alloc] init];
|
||||
delegation.protocol = @protocol(FSCalendarDelegateAppearance);
|
||||
delegation.deprecations = @{
|
||||
FSCalendarSelectorEntry(calendarCurrentPageDidChange:, calendarCurrentMonthDidChange:),
|
||||
FSCalendarSelectorEntry(calendar:shouldSelectDate:atMonthPosition:, calendar:shouldSelectDate:),
|
||||
FSCalendarSelectorEntry(calendar:didSelectDate:atMonthPosition:, calendar:didSelectDate:),
|
||||
FSCalendarSelectorEntry(calendar:shouldDeselectDate:atMonthPosition:, calendar:shouldDeselectDate:),
|
||||
FSCalendarSelectorEntry(calendar:didDeselectDate:atMonthPosition:, calendar:didDeselectDate:)
|
||||
};
|
||||
return delegation;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue