diff --git a/TYCyclePagerViewDemo/TYCyclePagerView/TYCyclePagerView.m b/TYCyclePagerViewDemo/TYCyclePagerView/TYCyclePagerView.m index a2f42d5..3055159 100755 --- a/TYCyclePagerViewDemo/TYCyclePagerView/TYCyclePagerView.m +++ b/TYCyclePagerViewDemo/TYCyclePagerView/TYCyclePagerView.m @@ -142,7 +142,11 @@ - (void)timerFired:(NSTimer *)timer { return; } - [self scrollToNearlyIndexAtDirection:TYPagerScrollDirectionRight animate:YES]; + BOOL isRTL = NO; + if (@available(iOS 9.0, *)) { + isRTL = UIView.appearance.semanticContentAttribute == UISemanticContentAttributeForceRightToLeft; + } + [self scrollToNearlyIndexAtDirection:(isRTL ? TYPagerScrollDirectionLeft : TYPagerScrollDirectionRight) animate:YES]; } #pragma mark - getter