iOS 更改UIlabel行间距

            let paragraphStyle = NSMutableParagraphStyle()
            paragraphStyle.lineSpacing = 5//此处为设置行间距为5
            paragraphStyle.lineBreakMode = .byCharWrapping
            let attributes = [
                NSAttributedStringKey.font:UIFont.systemFont(ofSize: 13),
                NSAttributedStringKey.foregroundColor:UIColor().colorWithHexString(color: "666666"),
                NSAttributedStringKey.paragraphStyle: paragraphStyle
            ]

你可能感兴趣的:(iOS 更改UIlabel行间距)