8

I am using the following code for providing with the line spacing between the UILabel text.

let daysAttrString = NSMutableAttributedString(string: allDays)
  let paragraphStyle = NSMutableParagraphStyle()
  paragraphStyle.lineSpacing = 7
  paragraphStyle.minimumLineHeight = 7
  daysAttrString.addAttribute(NSParagraphStyleAttributeName, value:paragraphStyle, range:NSMakeRange(0, daysAttrString.length))
  cell.operationalDays.attributedText = daysAttrString

But i am getting the following warning as shown below when using SwiftLint:

Legacy Constructor

Why it is being shown and how to resolve this?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Chelsea Shawra
  • 1,593
  • 4
  • 22
  • 43

0 Answers0