我有一个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 ...