[AltStore] Adds redesigned AppViewController to view/download AltStore apps

This commit is contained in:
Riley Testut
2019-07-24 12:23:54 -07:00
parent 711dd69b74
commit fc44dfb19c
37 changed files with 1583 additions and 399 deletions

View File

@@ -0,0 +1,43 @@
//
// AppContentViewControllerCells.swift
// AltStore
//
// Created by Riley Testut on 7/24/19.
// Copyright © 2019 Riley Testut. All rights reserved.
//
import UIKit
class PermissionCollectionViewCell: UICollectionViewCell
{
@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
}
}
class AppContentTableViewCell: UITableViewCell
{
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
}
}