caipivara
3/4/2015 - 3:47 PM

Swift - Fit the table height to match it's contents

Swift - Fit the table height to match it's contents

extension UITableView {
	
	/** Fit the table height to match it's contents */
	func fitToContentHeight() {
		
		var frame = self.frame;
		frame.size.height = self.contentSize.height;
		self.frame = frame;
		
	}
	
}