45 lines
1.2 KiB
Swift
45 lines
1.2 KiB
Swift
//
|
|
// GameTableViewCell.swift
|
|
// Hthik
|
|
//
|
|
// Created by Hthik on 3/27/17.
|
|
// Copyright © 2017 Hthik. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class GameTableViewCell: UITableViewCell
|
|
{
|
|
@IBOutlet private(set) var nameLabel: UILabel!
|
|
@IBOutlet private(set) var artworkImageView: UIImageView!
|
|
|
|
@IBOutlet private(set) var artworkImageViewLeadingConstraint: NSLayoutConstraint!
|
|
@IBOutlet private(set) var artworkImageViewTrailingConstraint: NSLayoutConstraint!
|
|
|
|
override func awakeFromNib()
|
|
{
|
|
super.awakeFromNib()
|
|
// Initialization code
|
|
let myButton = UIButton()
|
|
// 设置按钮标题
|
|
ButtonModifier.setTitle(of: myButton, to: "Click Me")
|
|
|
|
// 设置按钮标题颜色
|
|
ButtonModifier.setTitleColor(of: myButton, to: .white)
|
|
|
|
// 设置按钮背景颜色
|
|
ButtonModifier.setBackgroundColor(of: myButton, to: .blue)
|
|
|
|
// 添加按钮点击事件
|
|
// ButtonModifier.addTarget(to: myButton, target: self, action: #selector(buttonClicked))
|
|
|
|
}
|
|
|
|
override func setSelected(_ selected: Bool, animated: Bool)
|
|
{
|
|
super.setSelected(selected, animated: animated)
|
|
|
|
// Configure the view for the selected state
|
|
}
|
|
}
|