Skip to content

Commit

Permalink
Remove deprecated setSelectedDate:animated:
Browse files Browse the repository at this point in the history
  • Loading branch information
jmig committed Aug 10, 2015
1 parent 27d97d1 commit 6b2828d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
10 changes: 0 additions & 10 deletions PDTSimpleCalendar/PDTSimpleCalendarViewController.h
Expand Up @@ -72,7 +72,6 @@
@property (nonatomic, assign) PDTSimpleCalendarViewWeekdayTextType weekdayTextType;



/** @name Getting Notified of changes */

/**
Expand All @@ -84,14 +83,6 @@
@property (nonatomic, weak) id<PDTSimpleCalendarViewDelegate> delegate;


/**
* Change the selected date of the calendar, and scroll to it
*
* @param newSelectedDate the date that will be selected
* @param animated if you want to animate the scrolling
*/
- (void)setSelectedDate:(NSDate *)newSelectedDate animated:(BOOL)animated __attribute__((deprecated("Use setSelectedDate: instead. Also setSelectedDate doesn't automatically scroll to the selected date. You need to explicitly call scrollToDate:animated: (or scrollToSelectedDate:)")));

/**
* Scroll to the current selected date in the calendar.
*
Expand All @@ -110,7 +101,6 @@
@end



/**
* The methods in `PDTSimpleCalendarViewDelegate` are all optional. It allows the delegate to be notified when the user interacts with the Calendar.
*/
Expand Down
8 changes: 0 additions & 8 deletions PDTSimpleCalendar/PDTSimpleCalendarViewController.m
Expand Up @@ -221,14 +221,6 @@ - (void)setSelectedDate:(NSDate *)newSelectedDate
}
}

//Deprecated, You need to use setSelectedDate: and call scrollToDate:animated: or scrollToSelectedDate:animated:
//TODO: Remove this in next release
- (void)setSelectedDate:(NSDate *)newSelectedDate animated:(BOOL)animated
{
[self setSelectedDate:newSelectedDate];
[self scrollToSelectedDate:animated];
}

#pragma mark - Scroll to a specific date

- (void)scrollToSelectedDate:(BOOL)animated
Expand Down
4 changes: 4 additions & 0 deletions RELEASENOTES.md
Expand Up @@ -6,6 +6,10 @@ Last version compatible with iOS6. Following versions will be compatible iOS7+.
You can now display a fixed-header with the days of the week. Set `weekdayHeaderEnabled = YES` to display it. For Backward compatibility, the default behavior is NO. Although having it visible might become the default behavior in 1.0.
You can also tweak the style of the weekdays by setting the property `weekdayTextType`;

`setSelectedDate:animated:` has been removed. If you were still using it, use the `selectedDate` property + `scrollToDate:animated:` (or `scrollToSelectedDate:`)

More Tests (but still many more needed specially for date calculation)!!! If you wanna contribute run pod install before opening the Workspace.

###0.8.0
Bug fixes and small improvements

Expand Down

0 comments on commit 6b2828d

Please sign in to comment.