Skip to content

Instantly share code, notes, and snippets.

View MohamedElabdEmber's full-sized avatar

MohamedElabdEmber

View GitHub Profile
@aataraxiaa
aataraxiaa / UITextView+NewHeight.swift
Last active September 22, 2023 16:35
UITextView extension with method to calculate new height based on content
extension UITextView {
/**
Calculates if new textview height (based on content) is larger than a base height
- parameter baseHeight: The base or minimum height
- returns: The new height
*/
func newHeight(withBaseHeight baseHeight: CGFloat) -> CGFloat {