Repo created

This commit is contained in:
Fr4nz D13trich 2025-11-22 13:58:55 +01:00
parent 4af19165ec
commit 68073add76
12458 changed files with 12350765 additions and 2 deletions

View file

@ -0,0 +1,13 @@
@IBDesignable
class LeftAlignedIconButton: UIButton {
override func layoutSubviews() {
super.layoutSubviews()
contentHorizontalAlignment = .left
let availableSpace = bounds.inset(by: contentEdgeInsets)
let imageWidth = imageView?.frame.width ?? 0
let titleWidth = titleLabel?.frame.width ?? 0
let availableWidth = availableSpace.width - imageEdgeInsets.right - imageWidth * 2 - titleWidth
titleEdgeInsets = UIEdgeInsets(top: 0, left: floor(availableWidth) / 2, bottom: 0, right: 0)
}
}