123456789101112131415161718192021222324252627282930313233343536373839 |
- import UIKit
- public class FFAlertAction {
- private(set) public var title: String? {
- get { return attributedTitle?.string }
- set { attributedTitle = NSAttributedString(string: newValue ?? "") }
- }
- internal(set) public var contentEdgInsets: UIEdgeInsets?
- private(set) var handler: ((FFAlertAction) -> Void)?
- private(set) public var attributedTitle: NSAttributedString?
- private(set) public var backgroundColor: UIColor
- init(attributedTitle: NSAttributedString?, contentEdgInsets: UIEdgeInsets? = nil,
- backgroundColor: UIColor? = nil, handler: ((FFAlertAction) -> Void)?) {
- self.contentEdgInsets = contentEdgInsets
- self.backgroundColor = backgroundColor ?? UIColor.white
- self.attributedTitle = attributedTitle
- self.handler = handler
- }
- init(title: String?, contentEdgInsets: UIEdgeInsets? = nil,
- backgroundColor: UIColor? = nil, handler: ((FFAlertAction) -> Void)?) {
- self.contentEdgInsets = contentEdgInsets
- self.backgroundColor = backgroundColor ?? UIColor.white
- self.title = title
- self.handler = handler
- }
- }
|