Skip to content

Commit 6959454

Browse files
committed
Backwards compatibility with Xcode 8
1 parent 481e4df commit 6959454

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

MGSwipeTableCell/MGSwipeButton.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ - (BOOL)isAppExtension
163163

164164
-(BOOL) isRTLLocale
165165
{
166+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
166167
if (@available(iOS 9, *)) {
168+
#else
169+
if ([[UIView class] respondsToSelector:@selector(userInterfaceLayoutDirectionForSemanticContentAttribute:)]) {
170+
#endif
167171
return [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:self.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft;
168172
}
169173
else if ([self isAppExtension]) {

MGSwipeTableCell/MGSwipeTableCell.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,11 @@ - (BOOL)isAppExtension
658658

659659
-(BOOL) isRTLLocale
660660
{
661+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
661662
if (@available(iOS 9, *)) {
663+
#else
664+
if ([[UIView class] respondsToSelector:@selector(userInterfaceLayoutDirectionForSemanticContentAttribute:)]) {
665+
#endif
662666
return [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:self.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft;
663667
}
664668
else if ([self isAppExtension]) {

0 commit comments

Comments
 (0)