diff --git a/TOPasscodeViewController/TOPasscodeViewController.m b/TOPasscodeViewController/TOPasscodeViewController.m index 764f944..ed4b2aa 100755 --- a/TOPasscodeViewController/TOPasscodeViewController.m +++ b/TOPasscodeViewController/TOPasscodeViewController.m @@ -456,6 +456,7 @@ - (void)keypadButtonTapped [UIView performWithoutAnimation:^{ if (title != nil) { [self.cancelButton setTitle:title forState:UIControlStateNormal]; + [self.cancelButton sizeToFit]; [self.cancelButton layoutIfNeeded]; } self.cancelButton.hidden = (title == nil);