
private func makeCriteriaMessage() -> NSAttributedString {
var plainTextAttributes = [NSAttributedString.Key: AnyObject]()
plainTextAttributes[.font] = UIFont.preferredFont(forTextStyle: .subheadline)
plainTextAttributes[.foregroundColor] = UIColor.secondaryLabel
var boldTextAttributes = [NSAttributedString.Key: AnyObject]()
boldTextAttributes[.foregroundColor] = UIColor.label
boldTextAttributes[.font] = UIFont.preferredFont(forTextStyle: .subheadline)
let attrText = NSMutableAttributedString(string: "Use at least ", attributes: plainTextAttributes)
attrText.append(NSAttributedString(string: "3 of these 4 ", attributes: boldTextAttributes))
attrText.append(NSAttributedString(string: "criteria when setting your password:", attributes: plainTextAttributes))
return attrText
}
attrText는 append 해야하기 때문에 NSMutableAttributeString으로 선언