How to SET the number of lines for a UILabel using Swift in Xcode : I am currently working on a project where I need to be able to set the number of lines for a UILabel. This means that if I input 5, the label HAS to conform and return 4 times (issues like having too few characters will not be a problem). So far, I have tried to do this by setting the .numberOfRows property, but this only places a limit on the UILabel which is not what I desire (if you are curious, there is some code below). Any help? 

My code:

    if Double(w!) > 277 {
        print("Values:")
        print(w!)
        let numRows = Int(w!/237)
        print(numRows)
        heightOfCell += Double(numRows)*20.5
        cell!.textLabel?.numberOfLines = numRows + 2
    }