37 lines
1.3 KiB
Swift
37 lines
1.3 KiB
Swift
//
|
|
// SettingsHeaderFooterView.swift
|
|
// AltStore
|
|
//
|
|
// Created by Riley Testut on 8/31/19.
|
|
// Copyright © 2019 Riley Testut. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
import Roxas
|
|
|
|
class SettingsHeaderFooterView: UITableViewHeaderFooterView
|
|
{
|
|
@IBOutlet var primaryLabel: UILabel!
|
|
@IBOutlet var secondaryLabel: UILabel!
|
|
@IBOutlet var button: UIButton!
|
|
|
|
@IBOutlet private var stackView: UIStackView!
|
|
|
|
override func awakeFromNib()
|
|
{
|
|
super.awakeFromNib()
|
|
|
|
self.contentView.layoutMargins = .zero
|
|
self.contentView.preservesSuperviewLayoutMargins = true
|
|
|
|
self.stackView.translatesAutoresizingMaskIntoConstraints = false
|
|
self.contentView.addSubview(self.stackView)
|
|
|
|
NSLayoutConstraint.activate([self.stackView.leadingAnchor.constraint(equalTo: self.contentView.layoutMarginsGuide.leadingAnchor),
|
|
self.stackView.trailingAnchor.constraint(equalTo: self.contentView.layoutMarginsGuide.trailingAnchor),
|
|
self.stackView.topAnchor.constraint(equalTo: self.contentView.layoutMarginsGuide.topAnchor),
|
|
self.stackView.bottomAnchor.constraint(equalTo: self.contentView.layoutMarginsGuide.bottomAnchor)])
|
|
}
|
|
}
|