diff --git a/ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_cell.mm b/ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_cell.mm index cdc37b1f711e..2377926f6d69 100644 --- a/ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_cell.mm +++ b/ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_cell.mm @@ -107,15 +107,23 @@ @implementation ManualFillPasswordCell - (void)prepareForReuse { [super prepareForReuse]; + [NSLayoutConstraint deactivateConstraints:self.verticalConstraints]; + self.verticalConstraints = @[]; + self.siteNameLabel.text = @""; + [self.usernameButton setTitle:@"" forState:UIControlStateNormal]; self.usernameButton.enabled = YES; [self.usernameButton setTitleColor:UIColor.cr_manualFillTintColor forState:UIControlStateNormal]; + [self.passwordButton setTitle:@"" forState:UIControlStateNormal]; self.passwordButton.accessibilityLabel = nil; self.passwordButton.hidden = NO; + self.manualFillCredential = nil; + + self.grayLine.hidden = NO; } - (void)setUpWithCredential:(ManualFillCredential*)credential @@ -183,10 +191,7 @@ - (void)setUpWithCredential:(ManualFillCredential*)credential self.passwordButton.hidden = YES; } - if (!isConnectedToNextCell) { - [verticalLeadViews addObject:self.grayLine]; - self.grayLine.hidden = NO; - } else { + if (isConnectedToNextCell) { self.grayLine.hidden = YES; }