diff --git a/FSCalendar/FSCalendar.m b/FSCalendar/FSCalendar.m index 0b0c4ef..1ec14e4 100644 --- a/FSCalendar/FSCalendar.m +++ b/FSCalendar/FSCalendar.m @@ -372,10 +372,10 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) { if (_needsAdjustingMonthPosition) { _needsAdjustingMonthPosition = NO; _supressEvent = NO; - BOOL oldValue = [CATransaction disableActions]; + [CATransaction begin]; [CATransaction setDisableActions:YES]; [self scrollToPageForDate:_pagingEnabled?_currentPage:(_currentPage?:self.selectedDate) animated:NO]; - [CATransaction setDisableActions:oldValue]; + [CATransaction commit]; } } diff --git a/FSCalendar/FSCalendarAnimator.m b/FSCalendar/FSCalendarAnimator.m index 8742de1..09849ba 100644 --- a/FSCalendar/FSCalendarAnimator.m +++ b/FSCalendar/FSCalendarAnimator.m @@ -198,7 +198,7 @@ [self performAlphaAnimationFrom:0 to:1 duration:0.4 exception:focusedRowNumber]; CGFloat duration = 0.3; - BOOL oldDisableActions = [CATransaction disableActions]; + [CATransaction begin]; [CATransaction setDisableActions:NO]; [self performPathAnimationFrom:self.calendar.maskLayer.path to:[UIBezierPath bezierPathWithRect:targetBounds].CGPath duration:duration completion:^{ @@ -220,7 +220,7 @@ [self boundingRectWillChange:targetBounds animated:animated]; [UIView commitAnimations]; } - [CATransaction setDisableActions:oldDisableActions]; + [CATransaction commit]; } else {