mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
38 lines
1.2 KiB
Swift
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")
|
|
}
|
|
|
|
}
|