//
//  SelfSizingButton.swift
//  SquareOffs
//
//  Created by Dmitry Stepanets on 30.10.2019.
//  Copyright © 2019 Dynamix Software. All rights reserved.
//

import UIKit

class SelfSizingButton: UIButton {
    override var intrinsicContentSize: CGSize {
        let size = super.intrinsicContentSize

        return CGSize(width: size.width + titleEdgeInsets.left + titleEdgeInsets.right,
                      height: size.height + titleEdgeInsets.top + titleEdgeInsets.bottom)
    }
}
