Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Baig hilalbaig

🎯
Focusing
Block or report user

Report or block hilalbaig

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hilalbaig
hilalbaig / CommentCell.swift
Last active Mar 1, 2019
Easy way to automatically manage height for growing UITextView embedded in UITableViewCell instead of manually calculating and providing it for each cell.
View CommentCell.swift
protocol CommentCellDelegate: class {
func updateHeight()
}
class CommentCell: UITableViewCell, UITextViewDelegate {
func textViewDidChange(_ textView: UITextView) {
delegate?.updateHeight()
}
}
@hilalbaig
hilalbaig / UINavigationBar+Height.swift
Last active Apr 3, 2019 — forked from siberianisaev/UINavigationBar+Height.swift
Change height of UINavigationBar - Swift 3
View UINavigationBar+Height.swift
import Foundation
import UIKit
private var AssociatedObjectHandle: UInt8 = 0
extension UINavigationBar {
var height: CGFloat {
get {
if let h = objc_getAssociatedObject(self, &AssociatedObjectHandle) as? CGFloat {
You can’t perform that action at this time.