2020-09-22 15:37:13 -07:00
|
|
|
//
|
|
|
|
|
// DocumentControlViewController.swift
|
|
|
|
|
// App
|
|
|
|
|
//
|
|
|
|
|
// Created by James Magahern on 9/22/20.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
|
|
|
|
|
|
class DocumentControlViewController: UIViewController
|
|
|
|
|
{
|
|
|
|
|
let documentControlView = StackView(dimension: .vertical)
|
|
|
|
|
let fontSizeAdjustView = FontSizeAdjustView()
|
2020-09-30 18:06:47 -07:00
|
|
|
let findOnPageControlView = DocumentControlView()
|
2020-09-22 15:37:13 -07:00
|
|
|
|
|
|
|
|
static public let preferredWidth = CGFloat(200.0)
|
|
|
|
|
|
|
|
|
|
convenience init() {
|
|
|
|
|
self.init(nibName: nil, bundle: nil)
|
|
|
|
|
|
2020-09-30 18:06:47 -07:00
|
|
|
findOnPageControlView.label.text = "Find On Page"
|
|
|
|
|
findOnPageControlView.imageView.image = UIImage(systemName: "magnifyingglass")
|
|
|
|
|
|
|
|
|
|
fontSizeAdjustView.drawsBottomSeparator = true
|
|
|
|
|
|
2020-09-22 15:37:13 -07:00
|
|
|
documentControlView.addArrangedSubview(fontSizeAdjustView)
|
2020-09-30 18:06:47 -07:00
|
|
|
documentControlView.addArrangedSubview(findOnPageControlView)
|
2020-09-22 15:37:13 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override func loadView() {
|
|
|
|
|
self.view = documentControlView
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override var preferredContentSize: CGSize {
|
|
|
|
|
get { documentControlView.sizeThatFits(CGSize(width: Self.preferredWidth, height: -1)) }
|
|
|
|
|
set {}
|
|
|
|
|
}
|
|
|
|
|
}
|