UI/common/pop/CustomPicker2.swift,
UI/common/pop/CustomPicker3.swift,
UI/common/pop/CustomPicker4.swift,
+ UI/common/pop/GroupDesPopView.swift,
UI/common/pop/LanguagePicker/LanguagePickerTitle.swift,
UI/common/pop/LanguagePicker/LanguagePickerView.swift,
UI/common/pop/LanguagePicker/LanguageSelectItem.swift,
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Slice 208@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Slice 208@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Slice 59@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Slice 59@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Slice 223@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Slice 223@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
override func setupViews() {
navBar.do { v in
v.title = "创建团队".l10n
+ v.rightView.setImage(UIImage(named: "help_icon"), for: .normal)
+ v.rightView.isHidden = false
}
view.addSubviews([headerView,nameView,typeView,desView,lightView,verifyView,okBtn])
nameView.do { v in
make.height.equalTo(46)
}
}
+ override func navRightViewTapped() {
+ let tip = GroupDesPopView()
+ tip.show()
+ }
@objc func typeAction(){
let vc = GroupTypeVC()
vc.didSelected = {[weak self] value in
}
}
override func setupViews(){
+ navBar.do { v in
+ v.title = "我的团队"
+ }
view.addSubview(segmentedView)
view.addSubview(listContainerView)
var color:UIColor{
switch self {
case .none:
- return .red
+ return .rgb(0xD9D9D9)
case .pfs:
- return .red
+ return .rgb(0xFF9232)
case .lpz:
- return .red
+ return .rgb(0x7C2CED)
case .gpz:
- return .red
+ return .rgb(0x21B7F8)
case .ccs:
- return .red
+ return .rgb(0xFF583B)
case .psy:
- return .red
+ return .rgb(0x4252FF)
case .bjy:
- return .red
+ return .rgb(0x13D598)
case .qns:
- return .red
+ return .rgb(0xF1BF18)
case .lqz:
- return .red
+ return .rgb(0x7C2CED)
case .gqz:
- return .red
+ return .rgb(0xF1BF18)
case .pps:
- return .red
+ return .rgb(0xF1BF18)
}
}
// Do any additional setup after loading the view.
}
override func setupViews() {
- self.navBar.title = "团队类型".l10n
+ navBar.do { v in
+ v.title = "团队类型".l10n
+ v.rightView.setImage(UIImage(named: "help_icon"), for: .normal)
+ v.rightView.isHidden = false
+ }
+
tableView.do { v in
v.backgroundColor = .color(.bgColor)
v.delegate = self
v.rowHeight = 52
v.separatorStyle = .none
v.contentInset = UIEdgeInsets(top: 10, left: 0, bottom: 0, right: 0)
- v.register(SelectCell.self, forCellReuseIdentifier: SelectCell.reuseID)
+ v.register(RoleCell.self, forCellReuseIdentifier: RoleCell.reuseID)
}
view.addSubviews([tableView,btn])
didSelected?(currentType)
self.navigationController?.popViewController(animated: true)
}
+ override func navRightViewTapped() {
+ let tip = GroupDesPopView()
+ tip.titleLabel.text = "团队角色说明".l10n
+ tip.titleLabel1.text = "团队角色是什么?".l10n
+ tip.desLabel2.text = "团队运动中各角色是分工明确、协同发力的核心单元,通过精准配合最大化团队运动效果;".l10n
+ tip.titleLabel2.text = "团队角色说明".l10n
+ tip.desLabel2.text = "破风手:以 “挡风减阻” 为核心,为后方队友节省体能;\n领骑者:把控整体节奏,稳定配速避免失衡;\n跟骑者:借助风阻优势储备体力,为关键阶段蓄力;\n冲刺手:聚焦终点前爆发,锁定最终成绩;\n配速员:作为 “节奏标杆”,助力队友校准目标; \n补给员:保障物资供应,维持运动续航; \n全能手:灵活补位,适配破风、带速等多元需求。".l10n
+ tip.tipsIcon.image = UIImage(named: "role_des")
+ tip.show()
+ }
}
extension GroupRoleVC:UITableViewDelegate,UITableViewDataSource {
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- let cell = SelectCell.cell(withTableView: tableView, indexPath: indexPath)
+ let cell = RoleCell.cell(withTableView: tableView, indexPath: indexPath)
cell.titleLabel.text = list[indexPath.row].name
+ cell.type.backgroundColor = list[indexPath.row].color
let rect = CGRect(x: 0, y: 0, width: kScreenWid - 36, height: 52)
if indexPath.row == 0 {
cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: 8, height: 8))
tableView.reloadData()
}
}
+class RoleCell: BaseTableViewCell {
+ let bgView = UIView()
+ let type = UIView()
+ let titleLabel = UILabel()
+ let selectedIcon = UIImageView()
+ let line = UIView()
+
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+ super.init(style: style, reuseIdentifier: reuseIdentifier)
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+ override func setupViews() {
+ contentView.addSubview(bgView)
+ bgView.addSubviews([type,titleLabel,selectedIcon,line])
+
+ backgroundColor = .color(.bgColor)
+ contentView.backgroundColor = .clear
+ selectionStyle = .none
+ bgView.do { v in
+ v.backgroundColor = .color(.cellBg)
+ }
+ type.do { v in
+ v.yc.setCornerRadius(3)
+ v.backgroundColor = .red
+ }
+ titleLabel.do { (v) in
+ v.textColor = .color(.first)
+ v.font = .bold(14)
+ v.textAlignment = .left
+ }
+
+ selectedIcon.image = UIImage(named: "cell_selected")
+ line.do { v in
+ v.backgroundColor = .color(.separateLine)
+ }
+ }
+
+ override func setupLayout() {
+ bgView.snp.makeConstraints { (m) in
+ m.left.right.equalToSuperview().inset(18)
+ m.top.equalToSuperview()
+ m.bottom.equalToSuperview()
+ }
+ type.snp.makeConstraints { make in
+ make.left.equalToSuperview().inset(16)
+ make.centerY.equalToSuperview()
+ make.width.equalTo(6)
+ make.height.equalTo(16)
+ }
+ selectedIcon.snp.makeConstraints { (m) in
+ m.width.equalTo(21)
+ m.height.equalTo(16)
+ m.right.equalToSuperview().inset(22)
+ m.centerY.equalToSuperview()
+ }
+ titleLabel.snp.makeConstraints { (m) in
+ m.centerY.equalToSuperview()
+ m.left.equalToSuperview().offset(32)
+ m.height.equalToSuperview()
+ }
+ line.snp.makeConstraints { make in
+ make.left.right.equalToSuperview().inset(18)
+ make.bottom.equalToSuperview()
+ make.height.equalTo(0.4)
+ }
+ }
+}
// Do any additional setup after loading the view.
}
+ open override var preferredStatusBarStyle: UIStatusBarStyle {
+ return .lightContent
+ }
override func setupViews() {
navBar.do { v in
v.title = "灯带设置".l10n
v.textColor = .color(.first)
v.font = .bold(16)
}
- backgroundColor = .white
}
override func setupLayout() {
}
@objc func tapAction(){
switch type {
+ case .light:
+ App.shared.goToPage(LightSetVC())
case .lcReportRate:
lcReportAction()
break
return cell
}
- func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
- let data = list[indexPath.section][indexPath.row]
- switch data {
- default:
- break
- }
- }
+// func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+// let data = list[indexPath.section][indexPath.row]
+// switch data {
+// case .light:
+//
+// default:
+// break
+// }
+// }
}
extension SportSetVC:SportSetCellDelegate {
func sportSetCellSwitchAction(cell:SportSetCell){
v.dataSource = segmentedDataSource
v.listContainer = listContainerView
}
- okBtn.set(title: "确认".l10n,style: .sport, target: self, action: #selector(okAction))
+ okBtn.set(title: "确定".l10n,style: .sport, target: self, action: #selector(okAction))
}
@objc func okAction(){
self.navigationController?.popViewController(animated: true)
--- /dev/null
+//
+// GroupDesPopView.swift
+// ShenYin
+//
+// Created by liangshi on 2026/2/10.
+//
+
+import UIKit
+
+
+class GroupDesPopView: BasePresentView {
+ let titleLabel = UILabel()
+ let scorllView = UIScrollView()
+ let titleLabel1 = UILabel()
+ let titleLabel2 = UILabel()
+ let tipsIcon = UIImageView()
+ let desLabel1 = UILabel()
+ let desLabel2 = UILabel()
+
+
+ init() {
+ let h = 700.0
+ super.init(contentHeight:h)
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+
+ override func setupSubView() {
+ super.setupSubView()
+
+ contentView.addSubviews([titleLabel,scorllView])
+ scorllView.addSubviews([titleLabel1,desLabel1,tipsIcon,titleLabel2,desLabel2])
+
+ }
+ override func setupLayout() {
+ super.setupLayout()
+ titleLabel.snp.makeConstraints { (m) in
+ m.top.equalToSuperview().inset(29)
+ m.left.right.equalToSuperview().inset(18)
+ }
+
+
+ scorllView.snp.makeConstraints { make in
+ make.width.equalTo(kScreenWid)
+ make.height.equalTo(610)
+ make.left.equalToSuperview().inset(0)
+ make.top.equalToSuperview().inset(90)
+ }
+ titleLabel1.snp.makeConstraints { (m) in
+ m.top.equalToSuperview()
+ m.left.equalToSuperview().inset(18)
+ m.width.equalTo(kScreenWid - 36)
+ }
+ desLabel1.snp.makeConstraints { (m) in
+ m.top.equalTo(titleLabel1.snp.bottom).offset(16)
+ m.left.equalToSuperview().inset(18)
+ m.width.equalTo(kScreenWid - 36)
+ }
+ tipsIcon.snp.makeConstraints { make in
+ make.left.equalTo(titleLabel1)
+ make.top.equalTo(desLabel1.snp.bottom).offset(24)
+ make.width.equalTo(339.fitR)
+ make.height.equalTo(205.fitR)
+ }
+
+ titleLabel2.snp.makeConstraints { (m) in
+ m.top.equalTo(tipsIcon.snp.bottom).offset(20)
+ m.left.equalToSuperview().inset(18)
+ m.width.equalTo(kScreenWid - 36)
+ }
+ desLabel2.snp.makeConstraints { (m) in
+ m.top.equalTo(titleLabel2.snp.bottom).offset(16)
+ m.left.equalToSuperview().inset(18)
+ m.width.equalTo(kScreenWid - 36)
+ m.bottom.equalToSuperview().inset(20)
+ }
+
+ }
+
+ override func setupStyle() {
+ super.setupStyle()
+ contentView.backgroundColor = .white
+ scorllView.do { v in
+ v.backgroundColor = .clear
+ }
+ titleLabel.do { (v) in
+ v.textColor = .color(.first)
+ v.font = .semiBold(24)
+ v.textAlignment = .left
+ v.text = "团队玩法说明".l10n
+ }
+ titleLabel1.do { (v) in
+ v.textColor = .color(.first)
+ v.font = .medium(16)
+ v.textAlignment = .left
+ v.text = "运动团队是什么?".l10n
+ }
+ desLabel1.do { v in
+ let text = "运动团队是由具备共同运动目标、互补技能的个体组成的集体,成员通过协作配合参与体育项目,追求竞技成绩、团队荣誉或共同健身目标;".l10n
+ let attributedString = NSMutableAttributedString(string: text)
+ let paragraphStyle = NSMutableParagraphStyle()
+ paragraphStyle.lineSpacing = 8
+ attributedString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: text.count))
+ v.attributedText = attributedString
+
+ v.textColor = .color(.secondary)
+ v.font = .medium(14)
+ v.textAlignment = .left
+ v.numberOfLines = 0
+ }
+ tipsIcon.do { v in
+ v.image = UIImage(named: "group_des")
+ }
+ titleLabel2.do { (v) in
+ v.textColor = .color(.first)
+ v.font = .medium(16)
+ v.textAlignment = .left
+ v.text = "团队玩法有什么?".l10n
+ }
+ desLabel2.do { v in
+ let text = "多人在线同步运动时,可实时查看队友的位置与运动数据,随时掌握彼此状态; 在选定时段内,系统会针对不同运动数据指标(如配速、距离等),生成对应的排名; 可自主选择团队内的功能角色,基于角色定位与队友分工协作,提升团队运动效率与配合度。".l10n
+ let attributedString = NSMutableAttributedString(string: text)
+ let paragraphStyle = NSMutableParagraphStyle()
+ paragraphStyle.lineSpacing = 8
+ attributedString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: text.count))
+ v.attributedText = attributedString
+
+ v.textColor = .color(.secondary)
+ v.font = .medium(14)
+ v.textAlignment = .left
+ v.numberOfLines = 0
+ }
+ }
+}