Skip to content

Commit

Permalink
Merge branch 'support-Xcode8-and-iOS10'
Browse files Browse the repository at this point in the history
  • Loading branch information
hongxinhope committed Aug 7, 2016
2 parents 5ada648 + b8d26c9 commit 17f33e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion SegmentedControl/SegmentedControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,11 @@ public extension SegmentedControl {
let titleLayer = CATextLayer()
titleLayer.frame = titleRect
titleLayer.alignmentMode = kCAAlignmentCenter
titleLayer.truncationMode = kCATruncationEnd
if #available(iOS 10.0, *) {
titleLayer.truncationMode = kCATruncationNone
} else {
titleLayer.truncationMode = kCATruncationEnd
}
titleLayer.string = titleString
titleLayer.contentsScale = UIScreen.mainScreen().scale
return titleLayer
Expand Down

0 comments on commit 17f33e6

Please sign in to comment.