Snippets Collections
.element {
  width: min(90%, 1200px); /* Set a minimum width of 90% or 1200px, whichever is larger */
}
    func setBalanceLabel(_ balance: String) {
        let height = balanceLabel.layer.frame.height
        balanceLabel.text = "  " + balance + "  "
        balanceLabel.sizeToFit()
        balanceLabel.layer.frame.size.height = height
        balanceLabel.layer.cornerRadius = balanceLabel.layer.frame.height/2
    }
star

Sat Apr 20 2024 22:31:44 GMT+0000 (Coordinated Universal Time)

#width #min()
star

Tue May 24 2022 10:32:06 GMT+0000 (Coordinated Universal Time)

#ios #swift #label #layout #width #labelwidth

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension