+++ /dev/null
-//
-// DialogTranlateVC.swift
-// ShenYin
-//
-// Created by liangshi on 2025/8/6.
-//
-
-import UIKit
-
-class DialogTranlateVC:BaseVC{
- let toolBar = RecordBar()
- let tableView = UITableView(frame: CGRectZero, style: .plain)
- var dataList = [1,2,3]
- override func viewDidLoad() {
- super.viewDidLoad()
- }
- override func setupViews() {
- navBar.title = "对话翻译"
- navBar.rightView.setImage(UIImage(named: "help_icon"), for: .normal)
-
-
- tableView.backgroundColor = .clear
- tableView.delegate = self
- tableView.dataSource = self
- tableView.estimatedRowHeight = 60
- tableView.separatorStyle = .none
- tableView.register(TranslateCell.self, forCellReuseIdentifier: TranslateCell.reuseID)
- view.addSubview(tableView)
- view.addSubview(toolBar)
-
- }
- override func setupLayout() {
- toolBar.snp.makeConstraints { make in
- make.width.centerX.equalToSuperview()
- make.height.equalTo(120)
- make.bottom.equalToSuperview().inset(20)
- }
- tableView.snp.makeConstraints { make in
- make.top.equalToSuperview().inset(80)
- make.left.right.equalToSuperview()
- make.bottom.equalTo(toolBar.snp.top)
- }
- }
- override func navRightViewTapped() {
- let tip = RecordTipsView(type: .dialog)
- tip.show()
- }
- func scrollToBottom(){
- if dataList.count > 0 {
- tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: true)
- }
- }
-}
-extension DialogTranlateVC:UITableViewDelegate,UITableViewDataSource {
- func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
- return dataList.count
- }
-
- func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- let cell = TranslateCell.cell(withTableView: tableView, indexPath: indexPath)
- // cell.data = dataList[indexPath.row]
- return cell
- }
- func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
-
- }
-}