设置"尊重语言方向和QUOT;为NSLayoutConstraint由code [英] set "Respect Language Direction" for NSLayoutConstraint by code
本文介绍了设置"尊重语言方向和QUOT;为NSLayoutConstraint由code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
哪能水平约束的尊重语言方向
属性设置为YES或NO时,由code这样创建的约束:
how can I set the Respect Language Direction
property of a horizontal constraint to 'YES' or 'NO' when the constraint is created by code like this:
NSLayoutConstraint *constraint = [NSLayoutConstraint constraintWithItem:self.tableView attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeading multiplier:1.0 constant:10.0];
P.S。到现在为止,我可以设置界面生成器
此属性约束的项目下的下拉列表
p.s. until now I can set this property in Interface Builder
under the constraint's item drop down list
推荐答案
前/后方面的语言方向。左/右没有。你只需要使用适当的属性为您所建立的约束。
Leading / trailing respects the language direction. Left / right doesn't. You just need to use the appropriate attributes for the constraint you are making.
这篇关于设置"尊重语言方向和QUOT;为NSLayoutConstraint由code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文