From e3552ab520651e15ddc5d95e426da7503c683aa0 Mon Sep 17 00:00:00 2001 From: donaldhu Date: Thu, 12 Sep 2024 18:00:17 -0400 Subject: [PATCH] Add constraint identifier to debug description Use the constraint debug format described here: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/DebuggingTricksandTips.html --- Masonry/NSLayoutConstraint+MASDebugAdditions.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Masonry/NSLayoutConstraint+MASDebugAdditions.m b/Masonry/NSLayoutConstraint+MASDebugAdditions.m index f6c43f54..7f733010 100644 --- a/Masonry/NSLayoutConstraint+MASDebugAdditions.m +++ b/Masonry/NSLayoutConstraint+MASDebugAdditions.m @@ -105,6 +105,9 @@ - (NSString *)description { NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"]; [description appendString:[self.class descriptionForObject:self]]; + if (self.identifier) { + [description appendFormat:@" '%@'", self.identifier]; + } [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]]; if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) {