         
         // 2.绘制字形
         // 需要绘制的范围
-        layoutManager.drawGlyphsForGlyphRange(NSRange(location: 0, length: textStorage.length), atPoint: CGPointZero)
+        let range = NSRange(location: 0, length: textStorage.length)
+        layoutManager.drawGlyphsForGlyphRange(range, atPoint: CGPointZero)
     }
 }
 

        
        // 3.让label可以和用户交互
        userInteractionEnabled = true
    }
    
    /// 准备文本

            attrString = NSAttributedString(string: "")
        }
        
        selectedRange = nil
        
        // 2.设置换行模型
        let attrStringM = addLineBreak(attrString!)
        
        attrStringM.addAttribute(NSFontAttributeName, value: font, range: NSRange(location: 0, length: attrStringM.length))
        
        // 3.设置textStorage的内容
        textStorage.setAttributedString(attrStringM)
