@@ -15,12 +15,24 @@ public class FastisController<Value: FastisValue>: UIViewController, JTACMonthVi
1515 // MARK: - Outlets
1616
1717 private lazy var cancelBarButtonItem : UIBarButtonItem = {
18+ if let customButton = self . appearance. customCancelButton {
19+ customButton. target = self
20+ customButton. action = #selector( self . cancel)
21+ return customButton
22+ }
23+
1824 let barButtonItem = UIBarButtonItem ( title: self . appearance. cancelButtonTitle, style: . plain, target: self , action: #selector( self . cancel) )
1925 barButtonItem. tintColor = self . appearance. barButtonItemsColor
2026 return barButtonItem
2127 } ( )
2228
2329 private lazy var doneBarButtonItem : UIBarButtonItem = {
30+ if let customButton = self . appearance. customDoneButton {
31+ customButton. target = self
32+ customButton. action = #selector( self . done)
33+ return customButton
34+ }
35+
2436 let barButtonItem = UIBarButtonItem ( title: self . appearance. doneButtonTitle, style: . done, target: self , action: #selector( self . done) )
2537 barButtonItem. tintColor = self . appearance. barButtonItemsColor
2638 barButtonItem. isEnabled = self . allowToChooseNilDate
@@ -526,5 +538,7 @@ extension FastisConfig {
526538 public var titleTextAttributes : [ NSAttributedString . Key : Any ] = [ : ]
527539 public var backgroundColor : UIColor = . white
528540 public var barButtonItemsColor : UIColor = . systemBlue
541+ public var customCancelButton : UIBarButtonItem ?
542+ public var customDoneButton : UIBarButtonItem ?
529543 }
530544}
0 commit comments