它运行良好,除了我收到此错误之外没有任何问题。
下面是我的代码。
NSDictionary *views = @{@"container":self.containerView,
@"head":self.headImageView,
@"userName":self.userNameLabel,
@"userTitle":self.userTitleLabel,
@"line":self.infoSeparatorLine,
@"articleTitle":self.articleTitleLabel
};
float headWidthAndHeight = 50;
NSDictionary *metrics = @{@"headWH":@(headWidthAndHeight),
@"userLabelWH":@(headWidthAndHeight/2),
};
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[container]|" options:0 metrics:nil views:views]];
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-10-[container]|" options:0 metrics:nil views:views]];
[self.containerView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-15-[head(headWH)]-5-[userName]-15-|" options:0 metrics:metrics views:views]];
[self.containerView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-15-[head(headWH)]-5-[userTitle]-15-|" options:0 metrics:metrics views:views]];
[self.containerView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[line]|" options:0 metrics:metrics views:views]];
[self.containerView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-15-[articleTitle]-15-|" options:0 metrics:metrics views:views]];
[self.containerView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[head(headWH)]-0-[line(1)]-8-[articleTitle]|" options:0 metrics:metrics views:views]];
[self.containerView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[userName(userLabelWH)]-0-[userTitle(userLabelWH)]" options:0 metrics:metrics views:views]];
以下是我在调试区域收到的错误消息。
我如何解决它?