Tusker/Tusker/Views/Profile Header/ProfileHeaderButton.swift

27 lines
683 B
Swift

//
// ProfileHeaderButton.swift
// Tusker
//
// Created by Shadowfacts on 12/22/22.
// Copyright © 2022 Shadowfacts. All rights reserved.
//
import UIKit
class ProfileHeaderButton: UIButton {
override func updateConfiguration() {
guard var config = self.configuration else {
return
}
config.baseForegroundColor = .label
config.cornerStyle = .capsule
var backgroundConfig = UIBackgroundConfiguration.clear()
backgroundConfig.visualEffect = UIBlurEffect(style: .systemThickMaterial)
config.background = backgroundConfig
config.imagePadding = 4
self.configuration = config
}
}