swift dynamic multiline text field

How do i create rows of mutilined text field dynamically (no Autolayout) using swift code. I want the column to expanded and shrink to see all the text




let font = UIFont(name: "Arial-ItalicMT", size: 20.0)

let labelSize = rectForText(dbtext, font: font!, maxSize: CGSizeMake(100,999))

heightTV = labelSize.height

print("heightTV \( heightTV )")

myTextview = UITextView(frame:CGRectMake(0, nexty, 100, heightTV))

myTextview.text = dbtext

myTextview.font = UIFont(name: "Arial-ItalicMT", size: 17.0)

myTextview.backgroundColor = UIColor.greenColor();

myTextview.textColor = UIColor.blueColor();

myTextview.scrollEnabled = true;

myTextview.editable = false;

myTextview.tag = index

self.myscroll.addSubview(myTextview);

print("myTextview_font \(myTextview.font)")

swift dynamic multiline text field
 
 
Q