2017-04-26 3 views
0

私のアプリケーションでは、レイアウト方向を右から左に設定しています。アプリケーションはtvOS 9でうまく動作しますが、tvOS 10でアプリケーションを実行すると、 OSがsetSemanticContentAttributeを無視しているようです。私は次のコードを使用しています。setSemanticContentAttribute:tvOS 10で動作しません。

if(IOS9) { 
    [[UINavigationBar appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight]; 
    [[UITabBar appearance] setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft]; 
    if ([[[UIView alloc] init] respondsToSelector:@selector(setSemanticContentAttribute:)]) { 
     [[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft]; 
     [[UILabel appearance] setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft]; 
     [[UITableView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft]; 
     [[UICollectionView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft]; 
     [[UIButton appearance] setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft]; 
    } 
}else{ 
    if ([[[UIView alloc] init] respondsToSelector:@selector(setSemanticContentAttribute:)]) { 
     [[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft]; 
    } 
} 

答えて

0

forceRightToLeftの値をtvOSのsemanticContentAttributeプロパティに設定しても効果はありません。とにかくビューは左から右に追加されます。

これはtvOSのバグですhttps://openradar.appspot.com/31138095

関連する問題