setSemanticContentAttribute: не работает в tvOS 10

В моем приложении я устанавливаю направление макета справа налево, мое приложение отлично работает на tvOS 9, но когда я запускаю свое приложение на tvOS 10, оно работает в направлении макета слева направо. Похоже, ОС игнорирует setSemanticContentAttribute. Я использую следующий код.

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

1 ответ

Установка значения forceRightToLeft для свойства semanticContentAttribute в tvOS не имеет никакого эффекта. Виды в любом случае добавляются слева направо.

Это ошибка в tvOS https://openradar.appspot.com/31138095

Другие вопросы по тегам