在辅助功能中启用粗体文本时,UIImageView的框架错误

时间:2016-07-20 12:22:26

标签: objective-c uiaccessibility

我有一个UIImageView,后边缘锚定在其他视图的前沿。

但是,当我在iPhone上的辅助功能设置中启用粗体文本时,图像视图的大小会大1pt,这会使图像呈现在错误的位置。

是UIKit的错误吗?

self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon"]];

[self.containerView addSubview:self.imageView];

[self.imageView setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
[self.imageView setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];
[self.imageView setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
[self.imageView setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];

// .. create constraints here ...

Inspector

0 个答案:

没有答案