fix iOS slider state error

This commit is contained in:
pengfei.zhou 2019-12-06 17:12:15 +08:00
parent 187dd9e0c3
commit b67ba993b4

View File

@ -204,10 +204,9 @@ - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
if (self.onPageSelectedFuncId && self.onPageSelectedFuncId.length > 0) { if (self.onPageSelectedFuncId && self.onPageSelectedFuncId.length > 0) {
if (pageIndex != self.lastPosition) { if (pageIndex != self.lastPosition) {
[self callJSResponse:self.onPageSelectedFuncId, @(pageIndex), nil]; [self callJSResponse:self.onPageSelectedFuncId, @(pageIndex), nil];
} else {
self.lastPosition = pageIndex;
} }
} }
self.lastPosition = pageIndex;
} }
- (void)slidePage:(NSDictionary *)params withPromise:(DoricPromise *)promise { - (void)slidePage:(NSDictionary *)params withPromise:(DoricPromise *)promise {