JXCategoryView icon indicating copy to clipboard operation
JXCategoryView copied to clipboard

RTL适配错误

Open IDwuqing opened this issue 3 years ago • 5 comments

RTL一般为阿语环境适配 但并不是单纯的把view左右翻转 就像12345 翻转就变成54321是不对的 一般只需对UICollectionView做处理就行 if ([RTLManager supportRTL]) { self.collectionView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;} view不需翻转

IDwuqing avatar Jun 10 '21 07:06 IDwuqing

JXCategoryListContainerRTLCell 、JXCategoryBaseCell 里面的[RTLManager horizontalFlipViewIfNeeded:self]; [RTLManager horizontalFlipViewIfNeeded:self.contentView]; 都不需要 注释掉

IDwuqing avatar Jun 10 '21 07:06 IDwuqing

你可以提交一个PR进行修复吗?RTL一块我不是很熟悉

pujiaxin33 avatar Sep 25 '21 00:09 pujiaxin33

UICollectionView在RTL下的适配 继承UICollectionViewFlowLayout 重写两个方法

-(UIUserInterfaceLayoutDirection)effectiveUserInterfaceLayoutDirection {

if (isRTL()) {
    return UIUserInterfaceLayoutDirectionRightToLeft;
}
return UIUserInterfaceLayoutDirectionLeftToRight;

}

  • (BOOL)flipsHorizontallyInOppositeLayoutDirection{ return YES; }

链接:https://www.jianshu.com/p/4fcf4a6710a1

KevinXinSuiLu avatar Oct 09 '21 10:10 KevinXinSuiLu

有修复的计划吗?

fuchenxi avatar Dec 01 '21 02:12 fuchenxi

有人帮忙提交PR修复RTL适配错误吗?

pujiaxin33 avatar Jul 17 '22 10:07 pujiaxin33