mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-15 09:43:34 +01:00
Adds basic AppsViewController implementation
This commit is contained in:
53
AltStore/Apps/AppTableViewCell.swift
Normal file
53
AltStore/Apps/AppTableViewCell.swift
Normal file
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// AppTableViewCell.swift
|
||||
// AltStore
|
||||
//
|
||||
// Created by Riley Testut on 5/9/19.
|
||||
// Copyright © 2019 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@objc class AppTableViewCell: UITableViewCell
|
||||
{
|
||||
@IBOutlet var nameLabel: UILabel!
|
||||
@IBOutlet var subtitleLabel: UILabel!
|
||||
@IBOutlet var appIconImageView: UIImageView!
|
||||
@IBOutlet var button: UIButton!
|
||||
|
||||
override func awakeFromNib()
|
||||
{
|
||||
super.awakeFromNib()
|
||||
|
||||
self.selectionStyle = .none
|
||||
}
|
||||
|
||||
override func setHighlighted(_ highlighted: Bool, animated: Bool)
|
||||
{
|
||||
super.setHighlighted(highlighted, animated: animated)
|
||||
|
||||
self.update()
|
||||
}
|
||||
|
||||
override func setSelected(_ selected: Bool, animated: Bool)
|
||||
{
|
||||
super.setSelected(selected, animated: animated)
|
||||
|
||||
self.update()
|
||||
}
|
||||
}
|
||||
|
||||
private extension AppTableViewCell
|
||||
{
|
||||
func update()
|
||||
{
|
||||
if self.isHighlighted || self.isSelected
|
||||
{
|
||||
self.contentView.backgroundColor = UIColor(white: 0.9, alpha: 1.0)
|
||||
}
|
||||
else
|
||||
{
|
||||
self.contentView.backgroundColor = .white
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user