I have a dynamic tableview that increases depending on its content (number of rows within it). However, once at the 11th cell for example, I want the height the frame of the tableview to stop increasing but allow the user to scroll to the bottom of the tableview. Below is the code to make the tableview dynamic.
override func observeValueForKeyPath(keyPath: String, ofObject object: AnyObject, change: [NSObject : AnyObject], context: UnsafeMutablePointer<Void>) {
var frame: CGRect = goalsTableView.frame
frame.size = goalsTableView.contentSize
goalsTableView.frame = frame
}