2019-11-07 06:40:10 -06:00
|
|
|
//
|
|
|
|
// InspectorIconHeaderView.swift
|
|
|
|
// NetNewsWire-iOS
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 11/6/19.
|
|
|
|
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
|
2025-01-25 11:01:12 -08:00
|
|
|
final class InspectorIconHeaderView: UITableViewHeaderFooterView {
|
2019-11-07 06:40:10 -06:00
|
|
|
|
|
|
|
var iconView = IconView()
|
2025-01-22 22:18:09 -08:00
|
|
|
|
2019-11-07 06:40:10 -06:00
|
|
|
override init(reuseIdentifier: String?) {
|
|
|
|
super.init(reuseIdentifier: reuseIdentifier)
|
|
|
|
commonInit()
|
|
|
|
}
|
2025-01-22 22:18:09 -08:00
|
|
|
|
2019-11-07 06:40:10 -06:00
|
|
|
required init?(coder: NSCoder) {
|
|
|
|
super.init(coder: coder)
|
|
|
|
commonInit()
|
|
|
|
}
|
2025-01-22 22:18:09 -08:00
|
|
|
|
2019-11-07 06:40:10 -06:00
|
|
|
func commonInit() {
|
|
|
|
addSubview(iconView)
|
|
|
|
}
|
|
|
|
|
|
|
|
override func layoutSubviews() {
|
|
|
|
let x = (bounds.width - 48.0) / 2
|
|
|
|
let y = (bounds.height - 48.0) / 2
|
|
|
|
iconView.frame = CGRect(x: x, y: y, width: 48.0, height: 48.0)
|
|
|
|
}
|
|
|
|
}
|