Skip to content

Commit

Permalink
Merge pull request Tencent#1034 from kimwjc/NavigationTitleViewAccess…
Browse files Browse the repository at this point in the history
…ibility

[fix][无障碍]修复在旁白开启状态下 QMUINavigationTitleView 中的文字无标题提示的问题
  • Loading branch information
MoLice authored Jun 30, 2020
2 parents 130a5aa + bb67771 commit 3c11f4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions QMUIKit/QMUIComponents/QMUINavigationTitleView.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ - (instancetype)initWithStyle:(QMUINavigationTitleViewStyle)style frame:(CGRect)
_titleLabel = [[UILabel alloc] init];
self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
self.titleLabel.accessibilityTraits |= UIAccessibilityTraitHeader;
[self.contentView addSubview:self.titleLabel];

_subtitleLabel = [[UILabel alloc] init];
self.subtitleLabel.textAlignment = NSTextAlignmentCenter;
self.subtitleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
self.subtitleLabel.accessibilityTraits |= UIAccessibilityTraitHeader;
[self.contentView addSubview:self.subtitleLabel];

self.userInteractionEnabled = NO;
Expand Down

0 comments on commit 3c11f4f

Please sign in to comment.