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];
}
}