1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-14 18:05:50 +01:00
mastodon-app-ufficiale-ipho.../MastodonSDK/Sources/MastodonUI/View/Button/CircleAvatarButton.swift
Nathan Mattes 8060017880
IOS-113, bullet 4: Replace icons (#980)
Co-authored-by: Marcus Kida <marcus.kida@bearologics.com>
2023-03-20 08:45:28 +01:00

28 lines
615 B
Swift

//
// CircleAvatarButton.swift
// Mastodon
//
// Created by Cirno MainasuK on 2021-9-15.
//
import UIKit
import Combine
public final class CircleAvatarButton: AvatarButton {
@Published public var needsHighlighted = false
public var borderColor: UIColor = UIColor.systemFill
public var borderWidth: CGFloat = 2.0
public override func updateAppearance() {
super.updateAppearance()
layer.masksToBounds = true
layer.cornerRadius = frame.width * 0.5
layer.borderColor = borderColor.cgColor
layer.borderWidth = borderWidth
}
}