1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-14 01:26:05 +01:00
mastodon-app-ufficiale-ipho.../MastodonSDK/Sources/MastodonUI/View/Button/CircleAvatarButton.swift

28 lines
615 B
Swift
Raw Normal View History

//
// 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 = 1.0
2021-10-28 13:17:41 +02:00
public override func updateAppearance() {
super.updateAppearance()
layer.masksToBounds = true
layer.cornerRadius = frame.width * 0.5
layer.borderColor = borderColor.cgColor
2021-10-28 13:17:41 +02:00
layer.borderWidth = borderWidth
}
}