2017-04-26 3 views
0

Dans mon application, je règle le sens de mise en page de droite à gauche, mon application fonctionne bien sur tvOS 9, mais lorsque je lance mon application sur tvOS 10, elle fonctionne dans le sens gauche-droite. Il semblerait que OS ignore ignorer setSemanticContentAttribute. J'utilise le code suivant.setSemanticContentAttribute: ne fonctionne pas dans 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]; 
    } 
} 

Répondre

0

Réglage de la valeur forceRightToLeft à la semanticContentAttribute de propriété tvOS n'a pas d'effet. Les vues sont quand même ajoutées de gauche à droite.

Ceci est un bug de tvOS https://openradar.appspot.com/31138095