Closed benjaminhorner closed 9 years ago
I had the same issue. I solved this problem setting the title formatter block like that:
var titleFormatterBlock: HMTitleFormatterBlock = {(control: AnyObject!, title: String!, index: UInt, selected: Bool) -> NSAttributedString in
let attrString = NSAttributedString(string: title, attributes: [NSForegroundColorAttributeName: UIColor.whiteColor()])
return attrString
}
self.segmentControl.titleFormatter = titleFormatterBlock
Thanks ! works like a charm
I have tried to implement a section title in my Swift App as an NSAttributedString but I get the following crash : -[NSConcreteAttributedString _fastCharacterContents].