Skip to content

Instantly share code, notes, and snippets.

Avatar

moraei

View GitHub Profile
@moraei
moraei / Expandable_TableView
Created Feb 25, 2019
Expandable table view
View Expandable_TableView
import UIKit
class ViewController: UITableViewController {
let cellId = "cellId123123"
var twoDimensionalArray = [
ExpandableNames(isExpanded: true, names: ["Amy", "Bill", "Zack", "Steve", "Jack", "Jill", "Mary"]),
ExpandableNames(isExpanded: true, names: ["Carl", "Chris", "Christina", "Cameron"]),
ExpandableNames(isExpanded: true, names: ["David", "Dan"]),
@moraei
moraei / Scroll_StackView
Last active Feb 25, 2019
Make a stack view scrollable
View Scroll_StackView
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(scrollView)
scrollView.addSubview(scrollViewContainer)
scrollViewContainer.addArrangedSubview(redView)