Skip to content

Instantly share code, notes, and snippets.

View dobster's full-sized avatar
🏠
Working from home

Stu Dobbie dobster

🏠
Working from home
View GitHub Profile
@dobster
dobster / ExpandoTableViewCell.swift
Last active June 25, 2023 14:12
Expanding Table View Cell to reveal UITextView
//
// ExpandoTableViewCell.swift
// TestExpandoCells
//
import UIKit
protocol ExpandoTableViewCellDelegate: class {
func expandoTableViewCellDidTapCell(_ cell: ExpandoTableViewCell)
func expandoTableViewCell(_ cell: ExpandoTableViewCell, didChangeNotes notes: String)
@dobster
dobster / ViewController.swift
Created October 29, 2018 11:54
Add Close button to a popover that presents full screen modal in horizontal compact
import UIKit
class ViewController: UIViewController, UIPopoverPresentationControllerDelegate {
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
super.prepare(for: segue, sender: sender)
segue.destination.popoverPresentationController?.delegate = self
}
// MARK: - UIPopoverPresentationControllerDelegate
@dobster
dobster / CircleFillView.swift
Created June 3, 2017 00:03
Animating change to mask layer for iOS UIView
import UIKit
class CircleFillView: UIView {
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
commonInit()
}