Skip to content

Commit

Permalink
change attributedStringKeys for newest swift
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bina committed Jan 4, 2018
1 parent de86af9 commit 062ee0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ScalePicker/ScalePicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ open class ScalePicker: UIView, SlidePickerDelegate {

open var valueFormatter: ValueFormatter = {(value: CGFloat) -> NSAttributedString in

let attrs = [NSAttributedStringKey.foregroundColor: UIColor.white,
NSAttributedStringKey.font: UIFont.systemFont(ofSize: 15.0)]
let attrs = [NSForegroundColorAttributeName: UIColor.white,
NSFontAttributeName: UIFont.systemFont(ofSize: 15.0)]

return NSMutableAttributedString(string: value.format(".2"), attributes: attrs)
}
Expand Down
2 changes: 1 addition & 1 deletion ScalePicker/SlidePicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ open class SlidePickerCell: UICollectionViewCell {
let font = UIFont.systemFont(ofSize: 12.0)

let rect = textString.boundingRect(with: maximumTextSize, options: .usesLineFragmentOrigin,
attributes: [NSAttributedStringKey.font: font], context: nil)
attributes: [NSFontAttributeName: font], context: nil)

return (rect.width / 2) + 1
}()
Expand Down

0 comments on commit 062ee0b

Please sign in to comment.