Skip to content

Commit

Permalink
Merge pull request #25 from kmcgill88/24-ToolbarItems-Font-For-Other-…
Browse files Browse the repository at this point in the history
…States

24 toolbar items font for other states
  • Loading branch information
kmcgill88 authored Oct 21, 2017
2 parents 7690fe2 + fefb2a2 commit e006317
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Example/Tests/McPickerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ class McPickerTests: XCTestCase {
//
XCTAssertEqual(expectedFont, cancelBarButton.titleTextAttributes(for: .normal)?[NSAttributedStringKey.font.rawValue] as! UIFont)
XCTAssertEqual(expectedFont, doneBarButton.titleTextAttributes(for: .normal)?[NSAttributedStringKey.font.rawValue] as! UIFont)
XCTAssertEqual(expectedFont, cancelBarButton.titleTextAttributes(for: .selected)?[NSAttributedStringKey.font.rawValue] as! UIFont)
XCTAssertEqual(expectedFont, doneBarButton.titleTextAttributes(for: .selected)?[NSAttributedStringKey.font.rawValue] as! UIFont)
}

func testSetPickerBackgroundColor() {
Expand Down
1 change: 1 addition & 0 deletions McPicker/Classes/McPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ open class McPicker: UIView {
didSet {
applyToolbarButtonItemsSettings { (barButtonItem) in
barButtonItem.setTitleTextAttributes([.font: toolbarItemsFont!], for: .normal)
barButtonItem.setTitleTextAttributes([.font: toolbarItemsFont!], for: .selected)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ McPicker's `doneHandler` passes back `selections: [Int : String]` as an argument
- Swift 4.0
- Xcode 9

> __Note__: Starting in 0.5.1 McPicker uses the Swift 4 Compiler. [Ensure the correct compiler is set in your project.](https://github.com/kmcgill88/McPicker-iOS/issues/23)
> __Note__: Starting in 0.5.1 McPicker uses the Swift 4 Compiler. [Ensure the correct compiler is set in your project.](https://github.com/kmcgill88/McPicker-iOS/issues/23). If you'd like to use Swift 3 use version <=0.5.0.
## Installation

Expand Down

0 comments on commit e006317

Please sign in to comment.