2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00
Nathan Mattes 94c51eaed6 Migrate FollowButton to use UIButton.Configuration
also: Refactor Button-Background-Stuff
2023-10-19 13:10:14 +02:00

21 lines
542 B
Swift

// Copyright © 2023 Mastodon gGmbH. All rights reserved.
import UIKit
import MastodonAsset
public final class FollowButton: UIButton {
public init() {
super.init(frame: .zero)
configureAppearance()
}
required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") }
private func configureAppearance() {
var buttonConfiguration = UIButton.Configuration.filled()
buttonConfiguration.background.cornerRadius = 10
self.configuration = buttonConfiguration
}
}