Gum button. Contains Small
, Medium
, Large
sizes.
I tried to recreate the gum effect of the button.
enum SizeButton {
case s, m, l
}
In Xcode go to Project -> Your Project Name -> Package Dependencies
-> Tap Plus. Insert url:
https://github.com/roslog00/ExpandingButton
or adding it to the dependencies
of your Package.swift
:
dependencies: [
.package(url: "https://github.com/roslog00/ExpandingButton", .upToNextMajor(from: "1.0"))
]
You can use basic way via ExpandingButton
:
let button = ExpandingButton(text: "Agree")
If you need customisation font, colors or any other, make view:
let button = ExpandingButton(text: "Agree",
font: .title2,
size: .l,
textColor: .white,
backgroundColor: .black,
cornerRadius: 20,
kerning: 40)