0

I'm using "adjustsFontSizeToFitWidth" but the text is getting too small.

the cell need change according the text size.

 func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

    var cell = tableView.dequeueReusableCellWithIdentifier("myCell") as! DetailCustomCell!
    if cell == nil {
        cell = DetailCustomCell(style: UITableViewCellStyle.Default, reuseIdentifier: "myCell")
    }

    let object:PFObject = self.myComentarios[indexPath.row]

    if let comentario = object["textoComentario"] as? String {
        cell.userTxt.text = comentario
        cell.userTxt.adjustsFontSizeToFitWidth = true

How can i do that in Swift ???

LuckyStarr
  • 1,468
  • 2
  • 26
  • 39
Mercenario
  • 45
  • 1
  • 6

0 Answers0