本文主要是介绍ios app 阿拉伯语 RTL 的NSWritingDirectionAttributeName,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
-
//NSWritingDirectionAttributeName 设置文字书写方向,取值为以下组合
-
// iOS9.0以前
-
//@[@(NSWritingDirectionLeftToRight | NSTextWritingDirectionEmbedding)]
-
//@[@(NSWritingDirectionLeftToRight | NSTextWritingDirectionOverride)]
-
//@[@(NSWritingDirectionRightToLeft | NSTextWritingDirectionEmbedding)]
-
//@[@(NSWritingDirectionRightToLeft | NSTextWritingDirectionOverride)]
-
// iOS9.0以后
-
//@[@(NSWritingDirectionLeftToRight | NSWritingDirectionEmbedding)]
-
//@[@(NSWritingDirectionLeftToRight | NSWritingDirectionOverride)]
-
//@[@(NSWritingDirectionRightToLeft | NSWritingDirectionEmbedding)]
-
//@[@(NSWritingDirectionRightToLeft | NSWritingDirectionOverride)]
-
// NSWritingDirectionOverride 和 NSWritingDirectionEmbedding 是指定Unicode双向定义的格式控制算法
1, @[@(NSWritingDirectionRightToLeft | NSWritingDirectionOverride)] 字符串右到左书写模式 ,如果是字符串是:“国家经济问题相关” 会显示成 “关相题问济经家国”,其他语言也是如此
2,@[@(NSWritingDirectionRightToLeft | NSWritingDirectionEmbedding)] 字符串右到左书写模式 ,如果是字符串是:“国家经济问题相关” 会显示成 “国家经济问题相关”
这篇关于ios app 阿拉伯语 RTL 的NSWritingDirectionAttributeName的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!