Set height UILabel to 0

后端 未结 3 1611
悲哀的现实
悲哀的现实 2021-01-27 13:09

Is there anyway to set the height of a UILabel programmatically? I\'ve added a bunch of constraints to my .Xib files so every other label is dependent upon the one above or belo

3条回答
  •  旧时难觅i
    2021-01-27 14:06

    try this:

    var frame: CGRect = nameLabel.frame
    frame.size.height = height
    nameLabel.frame = frame
    

提交回复
热议问题