mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
51 lines
1.1 KiB
Swift
51 lines
1.1 KiB
Swift
|
|
//
|
||
|
|
// InstructionsViewController.swift
|
||
|
|
// AltStore
|
||
|
|
//
|
||
|
|
// Created by Riley Testut on 9/6/19.
|
||
|
|
// Copyright © 2019 Riley Testut. All rights reserved.
|
||
|
|
//
|
||
|
|
|
||
|
|
import UIKit
|
||
|
|
|
||
|
|
class InstructionsViewController: UIViewController
|
||
|
|
{
|
||
|
|
var completionHandler: (() -> Void)?
|
||
|
|
|
||
|
|
var showsBottomButton: Bool = false
|
||
|
|
|
||
|
|
@IBOutlet private var contentStackView: UIStackView!
|
||
|
|
@IBOutlet private var dismissButton: UIButton!
|
||
|
|
|
||
|
|
override func viewDidLoad()
|
||
|
|
{
|
||
|
|
super.viewDidLoad()
|
||
|
|
|
||
|
|
if UIScreen.main.isExtraCompactHeight
|
||
|
|
{
|
||
|
|
self.contentStackView.layoutMargins.top = 0
|
||
|
|
self.contentStackView.layoutMargins.bottom = self.contentStackView.layoutMargins.left
|
||
|
|
}
|
||
|
|
|
||
|
|
self.dismissButton.clipsToBounds = true
|
||
|
|
self.dismissButton.layer.cornerRadius = 16
|
||
|
|
|
||
|
|
if self.showsBottomButton
|
||
|
|
{
|
||
|
|
self.navigationItem.hidesBackButton = true
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
self.dismissButton.isHidden = true
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private extension InstructionsViewController
|
||
|
|
{
|
||
|
|
@IBAction func dismiss()
|
||
|
|
{
|
||
|
|
self.completionHandler?()
|
||
|
|
}
|
||
|
|
}
|