修改UI
This commit is contained in:
26
Pods/JXCategoryView/Sources/RLTManager/RTLManager.m
generated
Normal file
26
Pods/JXCategoryView/Sources/RLTManager/RTLManager.m
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// RTLManager.m
|
||||
// JXCategoryView
|
||||
//
|
||||
// Created by jiaxin on 2020/7/3.
|
||||
//
|
||||
|
||||
#import "RTLManager.h"
|
||||
|
||||
@implementation RTLManager
|
||||
|
||||
+ (BOOL)supportRTL {
|
||||
return [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:UIView.appearance.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft;
|
||||
}
|
||||
|
||||
+ (void)horizontalFlipView:(UIView *)view {
|
||||
view.transform = CGAffineTransformMakeScale(-1, 1);
|
||||
}
|
||||
|
||||
+ (void)horizontalFlipViewIfNeeded:(UIView *)view {
|
||||
if ([self supportRTL]) {
|
||||
[self horizontalFlipView:view];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user