diff --git a/Example/McPicker/ViewController.swift b/Example/McPicker/ViewController.swift index 1cda401..3623ab2 100644 --- a/Example/McPicker/ViewController.swift +++ b/Example/McPicker/ViewController.swift @@ -77,15 +77,15 @@ class ViewController: UIViewController { ] let mcPicker = McPicker(data: data) - mcPicker.label = customLabel // Set your custom label - mcPicker.toolbarItemsFont = UIFont(name:"American Typewriter", size: 17)! - let fixedSpace = McPickerBarButtonItem.fixedSpace(width: 20.0) let flexibleSpace = McPickerBarButtonItem.flexibleSpace() let fireButton = McPickerBarButtonItem.done(mcPicker: mcPicker, title: "Fire!!!") // Set custom Text let cancelButton = McPickerBarButtonItem.cancel(mcPicker: mcPicker, barButtonSystemItem: .cancel) // or system items mcPicker.setToolbarItems(items: [fixedSpace, cancelButton, flexibleSpace, fireButton, fixedSpace]) + mcPicker.label = customLabel // Set your custom label + mcPicker.toolbarItemsFont = UIFont(name:"American Typewriter", size: 17)! + mcPicker.toolbarButtonsColor = .white mcPicker.toolbarBarTintColor = .darkGray mcPicker.pickerBackgroundColor = .gray diff --git a/README.md b/README.md index f500209..ecdc229 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,6 @@ customLabel.textColor = .white customLabel.font = UIFont(name:"American Typewriter", size: 30)! let mcPicker = McPicker(data: data) -mcPicker.label = customLabel // Set your custom label -mcPicker.toolbarItemsFont = UIFont(name:"American Typewriter", size: 17)! let fixedSpace = McPickerBarButtonItem.fixedSpace(width: 20.0) let flexibleSpace = McPickerBarButtonItem.flexibleSpace() @@ -55,6 +53,9 @@ let fireButton = McPickerBarButtonItem.done(mcPicker: mcPicker, title: "Fire!!!" let cancelButton = McPickerBarButtonItem.cancel(mcPicker: mcPicker, barButtonSystemItem: .cancel) mcPicker.setToolbarItems(items: [fixedSpace, cancelButton, flexibleSpace, fireButton, fixedSpace]) +mcPicker.label = customLabel // Set your custom label +mcPicker.toolbarItemsFont = UIFont(name:"American Typewriter", size: 17)! + mcPicker.toolbarButtonsColor = .white mcPicker.toolbarBarTintColor = .darkGray mcPicker.pickerBackgroundColor = .gray