UITextView: ¿no puede establecer atributos de subrayado o tachado en el texto?

Cada vez que intento establecer atributos de subrayado o tachado en el texto atribuido de un UITextView, recibo fallas en el tiempo de ejecución. Otras propiedades, como la fuente y el color de fondo, no tienen problemas. Aquí hay un fragmento de código. Todo lo que tengo es un proyecto de prueba con un solo UITextView. Estoy en iOS 11.

class ViewController: UIViewController {

    @IBOutlet weak var myTextView: UITextView!

    var myMutableString = NSMutableAttributedString(string: "")

    override func viewDidLoad() {
        super.viewDidLoad()

        let string = "The cow jumped over the moon" as NSString
        myMutableString = NSMutableAttributedString(string: string as String)

        let underlineAttribute = [NSAttributedStringKey.underlineStyle: NSUnderlineStyle.styleSingle]

        myMutableString.addAttributes(underlineAttribute, range: string.range(of: "cow"))

        myTextView.attributedText = myMutableString
    }
}

Esto hace que el texto desaparezca y se impriman algunos errores:

2017-11-05 19:43:34.708830-0800 UITextView_Test[11771:907014]
-[_SwiftValue _getValue:forType:]: unrecognized selector sent to instance 0x60c00004eb50 2017-11-05 19:43:34.709351-0800 UITextView_Test[11771:907014] <NSATSTypesetter: 0x60800016be80>: Exception -[_SwiftValue _getValue:forType:]: unrecognized selector sent to instance 0x60c00004eb50 raised during typesetting layout manager <NSLayoutManager: 0x6080001fe400>
    1 containers, text backing has 28 characters
    Currently holding 28 glyphs.
    Glyph tree contents:  28 characters, 28 glyphs, 1 nodes, 64 node bytes, 64 storage bytes, 128 total bytes, 4.57 bytes per character,
4.57 bytes per glyph
    Layout tree contents:  28 characters, 28 glyphs, 0 laid glyphs, 0 laid line fragments, 1 nodes, 64 node bytes, 0 storage bytes, 64 total bytes, 2.29 bytes per character, 2.29 bytes per glyph, 0.00 laid glyphs per laid line fragment, 0.00 bytes per laid line fragment , glyph range {0 28}. Ignoring... 2017-11-05 19:43:34.709827-0800 UITextView_Test[11771:907014] -[_SwiftValue _getValue:forType:]: unrecognized selector sent to instance 0x60c00004eb50 2017-11-05 19:43:34.710014-0800 UITextView_Test[11771:907014] <NSATSTypesetter: 0x60800016be80>: Exception -[_SwiftValue _getValue:forType:]: unrecognized selector sent to instance 0x60c00004eb50 raised during typesetting layout manager <NSLayoutManager: 0x6080001fe400>
    1 containers, text backing has 28 characters
    Currently holding 28 glyphs.
    Glyph tree contents:  28 characters, 28 glyphs, 1 nodes, 64 node bytes, 64 storage bytes, 128 total bytes, 4.57 bytes per character,
4.57 bytes per glyph
    Layout tree contents:  28 characters, 28 glyphs, 0 laid glyphs, 0 laid line fragments, 1 nodes, 64 node bytes, 0 storage bytes, 64 total bytes, 2.29 bytes per character, 2.29 bytes per glyph, 0.00 laid glyphs per laid line fragment, 0.00 bytes per laid line fragment , glyph range {0 28}. Ignoring...

Respuestas a la pregunta(1)

Su respuesta a la pregunta