2017-04-09 123 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

請您描述的步驟。 –