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