revised how fields clear themselves

This commit is contained in:
Kevin G Christiano 2020-04-28 14:14:26 -04:00
parent b072fbb558
commit e5ab254579

View File

@ -35,6 +35,7 @@ import UIKit
digitBoxes.append(newDigitBox) digitBoxes.append(newDigitBox)
} }
self.digitBoxes.forEach { $0.removeFromSuperview() }
self.digitBoxes = digitBoxes self.digitBoxes = digitBoxes
guard let space = MFSizeObject(standardSize: 5, smalliPhoneSize: 3)?.getValueBasedOnScreenSize() else { return } guard let space = MFSizeObject(standardSize: 5, smalliPhoneSize: 3)?.getValueBasedOnScreenSize() else { return }
@ -245,10 +246,7 @@ import UIKit
switchFieldsAutomatically = false switchFieldsAutomatically = false
selectedDigitBox = nil selectedDigitBox = nil
text = "" text = ""
digitBoxes.forEach { digitBoxes.forEach { $0.digitField.text = "" }
$0.removeFromSuperview()
}
digitBoxes = []
} }
//-------------------------------------------------- //--------------------------------------------------