2017-04-09 149 views
1

首先我曾在Android和RTL做工不错, 添加以下代码:阵营原住民 - RTL在IOS

I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance(); 
    sharedI18nUtilInstance.setAllowRTL(context, true); 

到MainActivity.java 和

android:supportsRtl="true" 

到AndroidManifest。 xml

and in the js code:

I18nManager.forceRTL(true); 

现在的问题是: 我试图设置RTL iOS上,但它不工作 我在js代码 添加

// in AppDelegate.m 
    [[RCTI18nUtil sharedInstance] allowRTL:YES]; 

I18nManager.forceRTL(true); 

,但所有的文字和Flex是仍然ltr ... 我能做什么?

+0

尝试设置'writingDirection'到'rtl',http://facebook.github.io/react -native/docs/text.html#style – Cherniv

+0

@Cherniv不为我工作 – gregory

回答

1

您必须添加一个RTL语言默认的旁边,它会工作,更多信息可以发现here

+1

Tnx,但没有描述那里说如何做到这一点.. – gregory

+0

请您描述的步骤。 –