2019-07-24 12:23:54 -07:00
|
|
|
//
|
|
|
|
|
// AppContentViewControllerCells.swift
|
|
|
|
|
// AltStore
|
|
|
|
|
//
|
|
|
|
|
// Created by Riley Testut on 7/24/19.
|
|
|
|
|
// Copyright © 2019 Riley Testut. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
|
|
2023-01-04 09:52:12 -05:00
|
|
|
final class PermissionCollectionViewCell: UICollectionViewCell
|
2019-07-24 12:23:54 -07:00
|
|
|
{
|
|
|
|
|
@IBOutlet var button: UIButton!
|
|
|
|
|
@IBOutlet var textLabel: UILabel!
|
|
|
|
|
|
|
|
|
|
override func layoutSubviews()
|
|
|
|
|
{
|
|
|
|
|
super.layoutSubviews()
|
|
|
|
|
|
|
|
|
|
self.button.layer.cornerRadius = self.button.bounds.midY
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override func tintColorDidChange()
|
|
|
|
|
{
|
|
|
|
|
super.tintColorDidChange()
|
|
|
|
|
|
|
|
|
|
self.button.backgroundColor = self.tintColor.withAlphaComponent(0.15)
|
|
|
|
|
self.textLabel.textColor = self.tintColor
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-04 09:52:12 -05:00
|
|
|
final class AppContentTableViewCell: UITableViewCell
|
2019-07-24 12:23:54 -07:00
|
|
|
{
|
|
|
|
|
override func systemLayoutSizeFitting(_ targetSize: CGSize, withHorizontalFittingPriority horizontalFittingPriority: UILayoutPriority, verticalFittingPriority: UILayoutPriority) -> CGSize
|
|
|
|
|
{
|
|
|
|
|
// Ensure cell is laid out so it will report correct size.
|
|
|
|
|
self.layoutIfNeeded()
|
|
|
|
|
|
|
|
|
|
let size = super.systemLayoutSizeFitting(targetSize, withHorizontalFittingPriority: horizontalFittingPriority, verticalFittingPriority: verticalFittingPriority)
|
|
|
|
|
|
|
|
|
|
return size
|
|
|
|
|
}
|
|
|
|
|
}
|