37 lines
1.1 KiB
Swift
37 lines
1.1 KiB
Swift
|
//
|
||
|
// ViewController.swift
|
||
|
// SheetImagePickerTest
|
||
|
//
|
||
|
// Created by Shadowfacts on 9/23/19.
|
||
|
// Copyright © 2019 Shadowfacts. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import UIKit
|
||
|
import SheetImagePicker
|
||
|
|
||
|
class ViewController: UIViewController {
|
||
|
|
||
|
override func viewDidLoad() {
|
||
|
super.viewDidLoad()
|
||
|
// Do any additional setup after loading the view.
|
||
|
|
||
|
let content = UIViewController()
|
||
|
content.view.translatesAutoresizingMaskIntoConstraints = false
|
||
|
content.view.backgroundColor = .red
|
||
|
let sheet = SheetContainerViewController(content: content)
|
||
|
sheet.view.backgroundColor = .blue
|
||
|
|
||
|
addChild(sheet)
|
||
|
sheet.didMove(toParent: self)
|
||
|
view.addSubview(sheet.view)
|
||
|
NSLayoutConstraint.activate([
|
||
|
sheet.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||
|
sheet.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||
|
sheet.view.topAnchor.constraint(equalTo: view.topAnchor),
|
||
|
sheet.view.bottomAnchor.constraint(equalTo: view.bottomAnchor)
|
||
|
])
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|