Most of the Banking Apps these days seem to have this feature, user able to hide / unhide the Account balances shown on the screen by means of clicking a button or by any other user interaction.
This is a SwiftUI based App which imolements a MaskingManager to achieve this functionality. MaskingManager is a reusable file which enables this functionality and pretty straight forward to use.