Skip to content

Commit

Permalink
Fix a bug with previously selected cell staying highlighted.
Browse files Browse the repository at this point in the history
  • Loading branch information
robbdimitrov committed Feb 15, 2014
1 parent 7c35d48 commit 6082b39
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions RDVCalendarView.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = "RDVCalendarView"
s.version = "1.0.4"
s.version = "1.0.5"
s.summary = "Highly customizable calendarView and calendarViewController for iOS"
s.description = "RDVCalendarView is iPad and iPhone compatible. Everything can be customized.
Supports landscape and portrait orientations and is fully localized using NSLocale."
s.homepage = "https://github.com/robbdimitrov/RDVCalendarView"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "Robert Dimitrov" => "[email protected]" }
s.platform = :ios, '5.0'
s.source = { :git => "https://github.com/robbdimitrov/RDVCalendarView.git", :tag => "v1.0.4" }
s.source = { :git => "https://github.com/robbdimitrov/RDVCalendarView.git", :tag => "v1.0.5" }
s.source_files = 'RDVCalendarView', 'RDVCalendarView/**/*.{h,m}'
s.framework = 'UIKit', 'CoreGraphics', 'Foundation'
s.requires_arc = true
Expand Down
8 changes: 0 additions & 8 deletions RDVCalendarView/RDVCalendarDayCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ - (BOOL)isSelected {
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
if (selected == _selected) {
return;
}

_selected = selected;
_highlighted = NO;

Expand Down Expand Up @@ -127,10 +123,6 @@ - (BOOL)isHighlighted {
}

- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {
if (highlighted == _highlighted) {
return;
}

_highlighted = highlighted;
_selected = NO;

Expand Down
2 changes: 1 addition & 1 deletion RDVCalendarView/RDVCalendarView.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@class RDVCalendarDayCell;

typedef NS_ENUM(NSInteger, RDVCalendarViewDayCellSeparatorType) {
typedef NS_OPTIONS(NSInteger, RDVCalendarViewDayCellSeparatorType) {
RDVCalendarViewDayCellSeparatorTypeNone = 0,
RDVCalendarViewDayCellSeparatorTypeHorizontal = 1 << 0,
RDVCalendarViewDayCellSeparatorTypeVertical = 1 << 2,
Expand Down
2 changes: 1 addition & 1 deletion RDVCalendarView/RDVCalendarView.m
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ - (void)selectDayCellAtIndex:(NSInteger)index animated:(BOOL)animated {
}

_selectedDayCell = [self dayCellForIndex:index];
[_selectedDayCell setSelected:YES];
[_selectedDayCell setSelected:YES animated:animated];

[self setSelectedDay:selectedDayComponents];

Expand Down

0 comments on commit 6082b39

Please sign in to comment.