Bark/View/AddSoundCell.swift
2024-03-29 18:00:14 +08:00

38 lines
1.2 KiB
Swift

//
// AddSoundCell.swift
// Bark
//
// Created by Fin on 2024/3/29.
// Copyright © 2024 Fin. All rights reserved.
//
import UIKit
class AddSoundCell: UITableViewCell {
let button: UIButton = {
let button = UIButton(type: .system)
button.setTitle(NSLocalizedString("uploadSound"), for: .normal)
button.setImage(UIImage(named: "music_note-music_note_symbol"), for: .normal)
button.setTitleColor(BKColor.lightBlue.darken3, for: .normal)
button.tintColor = BKColor.lightBlue.darken3
button.titleLabel?.font = UIFont.systemFont(ofSize: 16)
// UITableView didSelectRowAt
button.isUserInteractionEnabled = false
return button
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
self.selectionStyle = .none
contentView.addSubview(button)
button.snp.makeConstraints { make in
make.edges.equalToSuperview()
make.height.equalTo(44)
}
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}