Skip to content

Commit

Permalink
Backwards compatibility with Xcode 8
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro committed Nov 11, 2017
1 parent 481e4df commit 6959454
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MGSwipeTableCell/MGSwipeButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ - (BOOL)isAppExtension

-(BOOL) isRTLLocale
{
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
if (@available(iOS 9, *)) {
#else
if ([[UIView class] respondsToSelector:@selector(userInterfaceLayoutDirectionForSemanticContentAttribute:)]) {
#endif
return [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:self.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft;
}
else if ([self isAppExtension]) {
Expand Down
4 changes: 4 additions & 0 deletions MGSwipeTableCell/MGSwipeTableCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,11 @@ - (BOOL)isAppExtension

-(BOOL) isRTLLocale
{
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
if (@available(iOS 9, *)) {
#else
if ([[UIView class] respondsToSelector:@selector(userInterfaceLayoutDirectionForSemanticContentAttribute:)]) {
#endif
return [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:self.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft;
}
else if ([self isAppExtension]) {
Expand Down

0 comments on commit 6959454

Please sign in to comment.