I went through the Text Kit Tutorial on raywenderlich.com and the line
edited(.EditedCharacters | .EditedAttributes, range: range, changeInLength: (str as NS
Put them all in an array like below:
instead of pipe
let timeDateComponents = calendar.components(NSCalendarUnit.Hour| NSCalendarUnit.Minute| NSCalendarUnit.Second, fromDate: NSDate())
try this
let timeDateComponents = calendar.components([NSCalendarUnit.Hour, NSCalendarUnit.Minute, NSCalendarUnit.Second], fromDate: NSDate())