check before use
This commit is contained in:
parent
245d7d93d6
commit
7bb6e5ba8d
@ -297,9 +297,11 @@ static CGFloat const IndicatorRectangleHeight = 4;
|
||||
if (selectedIndex != NSNotFound) {
|
||||
self.currentPage = selectedIndex;
|
||||
[self sendActionsForControlEvents:UIControlEventValueChanged];
|
||||
if (self.pagingTouchBlock) {
|
||||
self.pagingTouchBlock(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - MVMCoreUIPagingProtocol
|
||||
@ -351,8 +353,10 @@ static CGFloat const IndicatorRectangleHeight = 4;
|
||||
if ((index < self.numberOfPages && index >= 0) || self.alwaysSendingControlEvent) {
|
||||
[self setCurrentPage:index animated:NO];
|
||||
[self sendActionsForControlEvents:UIControlEventValueChanged];
|
||||
if (self.pagingTouchBlock) {
|
||||
self.pagingTouchBlock(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Animate pagecontrol indicator
|
||||
|
||||
Loading…
Reference in New Issue
Block a user