From cbab0db55cd1610c5f2c670a2a97d2fdd33f5de7 Mon Sep 17 00:00:00 2001 From: Dmitrii Diadiushkin Date: Thu, 10 Jun 2021 20:45:43 +0500 Subject: [PATCH 1/2] View Complete --- .../Components/DSRatingStackView.swift | 92 ++++++++++ .../UIStackView+addArrangedSubviews.swift | 4 + .../Flow/Feed/Feedback/FeedBackAssembly.swift | 16 ++ .../Feed/Feedback/FeedBackCoordinator.swift | 32 ++++ .../View/FeedBackViewController.swift | 56 ++++++ .../Feed/Feedback/View/FeedbackView.swift | 168 ++++++++++++++++++ DoSport/DoSport/Resourses/Icons/Icons.swift | 9 + .../star.filled.imageset/Contents.json | 21 +++ .../star.filled.imageset/star.filled.svg | 3 + .../star.imageset/Contents.json | 21 +++ .../Icons.xcassets/star.imageset/star.svg | 3 + DoSport/DoSport/Resourses/Texts.swift | 12 +- 12 files changed, 436 insertions(+), 1 deletion(-) create mode 100644 DoSport/DoSport/Core/CustomViews/Components/DSRatingStackView.swift create mode 100644 DoSport/DoSport/Flow/Feed/Feedback/FeedBackAssembly.swift create mode 100644 DoSport/DoSport/Flow/Feed/Feedback/FeedBackCoordinator.swift create mode 100644 DoSport/DoSport/Flow/Feed/Feedback/View/FeedBackViewController.swift create mode 100644 DoSport/DoSport/Flow/Feed/Feedback/View/FeedbackView.swift create mode 100644 DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.filled.imageset/Contents.json create mode 100644 DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.filled.imageset/star.filled.svg create mode 100644 DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.imageset/Contents.json create mode 100644 DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.imageset/star.svg diff --git a/DoSport/DoSport/Core/CustomViews/Components/DSRatingStackView.swift b/DoSport/DoSport/Core/CustomViews/Components/DSRatingStackView.swift new file mode 100644 index 00000000..9c3b5887 --- /dev/null +++ b/DoSport/DoSport/Core/CustomViews/Components/DSRatingStackView.swift @@ -0,0 +1,92 @@ +// +// DSRatingStackView.swift +// DoSport +// +// Created by Dmitrii Diadiushkin on 10.06.2021. +// + +import UIKit + +enum DSRatingStackViewState { + case unrated, rated +} + +protocol DSRatingStackViewDelegate: AnyObject { + func ratingViewTapped() +} + +final class DSRatingStackView: UIStackView { + + weak var delegate: DSRatingStackViewDelegate? + + private var stackViewState: DSRatingStackViewState = .unrated + + //MARK: Init + + init() { + super.init(frame: .zero) + + axis = .horizontal + spacing = 20 + distribution = .equalCentering + alignment = .center + isUserInteractionEnabled = true + + addArrangedSubviews(makeRatingImageViews(imageCount: 5)) + translatesAutoresizingMaskIntoConstraints = false + } + + required init(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} + +extension DSRatingStackView { + + func bind(state: DSRatingStackViewState) { + stackViewState = state + } + + func getState() -> DSRatingStackViewState { + return stackViewState + } +} + +private extension DSRatingStackView { + + func makeRatingImageViews(imageCount: Int) -> [UIImageView] { + var imageViewStack: [UIImageView] = [] + for tag in 1...imageCount { + let starImageView = UIImageView() + starImageView.image = UIImage(named: "star") + starImageView.frame.size.height = 20 + starImageView.frame.size.width = 20 + starImageView.tag = tag + starImageView.isUserInteractionEnabled = true + let starImageViewInteractionGesture = UITapGestureRecognizer(target: self, action: #selector(stackViewTapped)) + starImageView.addGestureRecognizer(starImageViewInteractionGesture) + imageViewStack.append(starImageView) + } + return imageViewStack + } + + @objc func stackViewTapped(sender: UITapGestureRecognizer) { + guard let tappedTag = sender.view?.tag else {return} + userRated(tappedTag) + if getState() == .unrated { + self.bind(state: .rated) + self.delegate?.ratingViewTapped() + } + } + + private func userRated(_ rating: Int) { + for (index, item) in self.subviews.enumerated() { + let imageView = item as! UIImageView + if index < rating { + imageView.image = UIImage(named: "star.filled") + } else { + imageView.image = UIImage(named: "star") + } + } + } +} diff --git a/DoSport/DoSport/Core/Extensions/UIStackView+addArrangedSubviews.swift b/DoSport/DoSport/Core/Extensions/UIStackView+addArrangedSubviews.swift index c14d73fb..d4611273 100644 --- a/DoSport/DoSport/Core/Extensions/UIStackView+addArrangedSubviews.swift +++ b/DoSport/DoSport/Core/Extensions/UIStackView+addArrangedSubviews.swift @@ -12,5 +12,9 @@ extension UIStackView { func addArrangedSubviews(_ subviews: UIView...) { subviews.forEach(self.addArrangedSubview) } + + func addArrangedSubviews(_ subviews: [UIView]) { + subviews.forEach(self.addArrangedSubview) + } } diff --git a/DoSport/DoSport/Flow/Feed/Feedback/FeedBackAssembly.swift b/DoSport/DoSport/Flow/Feed/Feedback/FeedBackAssembly.swift new file mode 100644 index 00000000..bb618bd5 --- /dev/null +++ b/DoSport/DoSport/Flow/Feed/Feedback/FeedBackAssembly.swift @@ -0,0 +1,16 @@ +// +// FeedBackAssembly.swift +// DoSport +// +// Created by Dmitrii Diadiushkin on 31.05.2021. +// + +import Foundation + +final class FeedBackAssembly: Assembly { + + func makeModule() -> FeedBackViewController { + let viewController = FeedBackViewController() + return viewController + } +} diff --git a/DoSport/DoSport/Flow/Feed/Feedback/FeedBackCoordinator.swift b/DoSport/DoSport/Flow/Feed/Feedback/FeedBackCoordinator.swift new file mode 100644 index 00000000..aeffc5af --- /dev/null +++ b/DoSport/DoSport/Flow/Feed/Feedback/FeedBackCoordinator.swift @@ -0,0 +1,32 @@ +// +// FeedBackCoordinator.swift +// DoSport +// +// Created by Dmitrii Diadiushkin on 31.05.2021. +// + +import UIKit + +final class FeedBackCoordinator: Coordinator { + + let rootViewController: FeedBackViewController + + var childCoordinators: [Coordinator] = [] + var navigationController: UINavigationController? + + init(navController: UINavigationController?) { + let assembly = FeedBackAssembly() + self.rootViewController = assembly.makeModule() + self.navigationController = navController + } + + func start() { + rootViewController.coordinator = self + navigationController?.pushViewController(rootViewController, animated: true) + } + + func goBack() { + navigationController?.dismiss(animated: true, completion: nil) + } + +} diff --git a/DoSport/DoSport/Flow/Feed/Feedback/View/FeedBackViewController.swift b/DoSport/DoSport/Flow/Feed/Feedback/View/FeedBackViewController.swift new file mode 100644 index 00000000..6ba7cdf2 --- /dev/null +++ b/DoSport/DoSport/Flow/Feed/Feedback/View/FeedBackViewController.swift @@ -0,0 +1,56 @@ +// +// FeedBackViewController.swift +// DoSport +// +// Created by Dmitrii Diadiushkin on 31.05.2021. +// + +import UIKit + +final class FeedBackViewController: UIViewController { + + weak var coordinator: FeedBackCoordinator? + private lazy var feedBackView = view as! FeedbackView + + // MARK: Life Cycle + + override func loadView() { + let view = FeedbackView() + self.view = view + } + + override func viewDidLoad() { + super.viewDidLoad() + + setupNavBar() + } + +} + +//MARK: - Private API + +private extension FeedBackViewController { + func setupNavBar() { + title = Texts.FeedBack.navTitle + navigationController?.navigationBar.titleTextAttributes = [ + NSAttributedString.Key.font: Fonts.sfProRegular(size: 18), + NSAttributedString.Key.foregroundColor: Colors.mainBlue + ] + + navigationItem.setHidesBackButton(true, animated: true) + let button = UIButton(type: .system) + button.setImage(Icons.EventCreate.cancel, for: .normal) + button.tintColor = Colors.mainBlue + button.addTarget(self, action: #selector(handleCancelButton), for: .touchUpInside) + navigationItem.rightBarButtonItem = UIBarButtonItem(customView: button) + } +} + +//MARK: Actions + +@objc private extension FeedBackViewController { + + func handleCancelButton() { + coordinator?.goBack() + } +} diff --git a/DoSport/DoSport/Flow/Feed/Feedback/View/FeedbackView.swift b/DoSport/DoSport/Flow/Feed/Feedback/View/FeedbackView.swift new file mode 100644 index 00000000..ddbdeb4c --- /dev/null +++ b/DoSport/DoSport/Flow/Feed/Feedback/View/FeedbackView.swift @@ -0,0 +1,168 @@ +// +// FeedbackView.swift +// DoSport +// +// Created by Dmitrii Diadiushkin on 31.05.2021. +// + +import UIKit + +final class FeedbackView: UIView { + + private lazy var avaImage: DSAvatartImageView = { + let image = DSAvatartImageView() + image.backgroundColor = .white + return image + }() + + private lazy var userNameLabel: UILabel = { + let label = UILabel() + label.text = "User Name" + label.frame.size.height = 24 + label.frame.size.width = 54 + label.font = Fonts.sfProRegular(size: 16) + label.textColor = Colors.lightBlue + return label + }() + + private lazy var feedBackTextField: UITextView = { + let textField = UITextView() + textField.backgroundColor = Colors.darkBlue + textField.text = Texts.FeedBack.placeholder + textField.font = Fonts.sfProRegular(size: 16) + textField.textColor = Colors.lightBlue + textField.delegate = self + + return textField + }() + + private lazy var ratingStackView: DSRatingStackView = { + let stackView = DSRatingStackView() + stackView.delegate = self + return stackView + }() + + private lazy var publishButton = DSCommonButton(title: Texts.FeedBack.publish, state: .disabled) + + //MARK: Init + + init() { + super.init(frame: .zero) + + backgroundColor = Colors.darkBlue + + addSubviews( + avaImage, + userNameLabel, + feedBackTextField, + ratingStackView, + publishButton + ) + + let hideKeyboardGesture = UITapGestureRecognizer(target: self, action: #selector(hideKeyboard)) + self.addGestureRecognizer(hideKeyboardGesture) + + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + //MARK: Functions + + override func layoutSubviews() { + super.layoutSubviews() + + var buttonsHeight: CGFloat = 48 + var buttonBottom: CGFloat = 15 + + switch UIDevice.deviceSize { // FIXME: костыль? + case .iPhone_5_5S_5C_SE1, .iPhone_6_6S_7_8_SE2: + buttonsHeight = 46 + case .iPhone_6_6S_7_8_PLUS, .iPhone_X_XS_12mini: + buttonsHeight = 48 + buttonBottom += 15 + case .iPhone_XR_11, .iPhone_XS_11Pro_Max, .iPhone_12_Pro, .iPhone_12_Pro_Max: + buttonsHeight = 49 + buttonBottom += 20 + } + + avaImage.snp.makeConstraints { + $0.height.equalTo(80) + $0.width.equalTo(80) + $0.top.equalToSuperview().offset(20) + $0.centerX.equalToSuperview() + } + + userNameLabel.snp.makeConstraints { + $0.centerX.equalTo(avaImage) + $0.top.equalTo(avaImage.snp.bottom).offset(12) + } + + feedBackTextField.snp.makeConstraints { + $0.top.equalTo(userNameLabel.snp.bottom).offset(16) + $0.left.equalToSuperview().offset(18) + $0.right.equalToSuperview().offset(-14) + $0.bottom.equalTo(ratingStackView.snp.top).offset(-12) + } + + ratingStackView.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.bottom.equalTo(publishButton.snp.top).offset(-51) + } + + publishButton.snp.makeConstraints { + $0.height.equalTo(buttonsHeight) + $0.left.equalToSuperview().offset(20) + $0.right.equalToSuperview().offset(-20) + $0.centerY.equalToSuperview() + } + + } +} + +extension FeedbackView: UITextViewDelegate { + func textViewDidBeginEditing(_ textView: UITextView) { + if textView.text == Texts.FeedBack.placeholder { + textView.text = "" + textView.textColor = .white + } + } + + func textViewDidChange(_ textView: UITextView) { + if textView.text.isEmpty { + publishButton.bind(state: .disabled) + } else { + checkForButtonOn() + } + } + + func textViewDidEndEditing(_ textView: UITextView) { + if textView.text.isEmpty { + textView.text = Texts.FeedBack.placeholder + textView.textColor = Colors.lightBlue + } + checkForButtonOn() + } +} + +extension FeedbackView: DSRatingStackViewDelegate { + func ratingViewTapped() { + checkForButtonOn() + } + +} + +extension FeedbackView { + @objc func hideKeyboard() { + self.endEditing(true) + } + + private func checkForButtonOn() { + if (feedBackTextField.text != Texts.FeedBack.placeholder) && (ratingStackView.getState() == .rated) { + publishButton.bind(state: .normal) + } else { + publishButton.bind(state: .disabled) + } + } +} diff --git a/DoSport/DoSport/Resourses/Icons/Icons.swift b/DoSport/DoSport/Resourses/Icons/Icons.swift index 0e11ed6f..b9a7ef7e 100644 --- a/DoSport/DoSport/Resourses/Icons/Icons.swift +++ b/DoSport/DoSport/Resourses/Icons/Icons.swift @@ -160,3 +160,12 @@ extension Icons { } } + +//MARK: - FeedBack + +extension Icons { + enum FeedBackIcons { + static var unscored = image(named: "star") + static var scored = image(named: "star.filled") + } +} diff --git a/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.filled.imageset/Contents.json b/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.filled.imageset/Contents.json new file mode 100644 index 00000000..a89dedc6 --- /dev/null +++ b/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.filled.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "star.filled.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.filled.imageset/star.filled.svg b/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.filled.imageset/star.filled.svg new file mode 100644 index 00000000..56425981 --- /dev/null +++ b/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.filled.imageset/star.filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.imageset/Contents.json b/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.imageset/Contents.json new file mode 100644 index 00000000..2309ec60 --- /dev/null +++ b/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "star.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.imageset/star.svg b/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.imageset/star.svg new file mode 100644 index 00000000..46f0470c --- /dev/null +++ b/DoSport/DoSport/Resourses/Icons/Icons.xcassets/star.imageset/star.svg @@ -0,0 +1,3 @@ + + + diff --git a/DoSport/DoSport/Resourses/Texts.swift b/DoSport/DoSport/Resourses/Texts.swift index f2fdf60a..cb8e7471 100644 --- a/DoSport/DoSport/Resourses/Texts.swift +++ b/DoSport/DoSport/Resourses/Texts.swift @@ -15,7 +15,7 @@ public enum Texts { static let subscribers = "Подписчики" static let subscribes = "Подписки" static let account = "Аккаунт" - static let alerts = "Увядомления" + static let alerts = "Уведомления" static let sound = "Звук" static let language = "Язык" static let privacy = "Конфеденциальность" @@ -311,3 +311,13 @@ extension Texts { static let group = "Групповые тренировки" } } + +//MARK: - Feedback screen + +extension Texts { + enum FeedBack { + static let navTitle = "Написать отзыв" + static let publish = "Опубликовать" + static let placeholder = "Поделись своими впечатлениями о площадке..." + } +} From 302c0c52c309df5ba4a94ea6f8446a07a4e236c9 Mon Sep 17 00:00:00 2001 From: Dmitrii-Diadiushkin Date: Thu, 1 Jul 2021 23:03:56 +0500 Subject: [PATCH 2/2] Some fixes Fix invisible project files --- DoSport/DoSport.xcodeproj/project.pbxproj | 36 +++++++++++++++++++ .../Feed/Feedback/View/FeedbackView.swift | 3 +- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/DoSport/DoSport.xcodeproj/project.pbxproj b/DoSport/DoSport.xcodeproj/project.pbxproj index 886a529c..f7fa6c03 100644 --- a/DoSport/DoSport.xcodeproj/project.pbxproj +++ b/DoSport/DoSport.xcodeproj/project.pbxproj @@ -242,6 +242,11 @@ 65EEB96025EA023400821F8F /* SettingsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EEB95F25EA023400821F8F /* SettingsDataSource.swift */; }; 65EEE91925B626290023168D /* AppConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EEE91825B626290023168D /* AppConfiguration.swift */; }; 65FFFD632604AFB400CD1CB5 /* NetworkErrorResponseType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65FFFD622604AFB400CD1CB5 /* NetworkErrorResponseType.swift */; }; + 6D625F3A268E3908000389D9 /* DSRatingStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D625F39268E3908000389D9 /* DSRatingStackView.swift */; }; + 6D625F47268E39F1000389D9 /* FeedBackAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D625F42268E39F1000389D9 /* FeedBackAssembly.swift */; }; + 6D625F48268E39F1000389D9 /* FeedBackCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D625F43268E39F1000389D9 /* FeedBackCoordinator.swift */; }; + 6D625F49268E39F1000389D9 /* FeedBackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D625F45268E39F1000389D9 /* FeedBackViewController.swift */; }; + 6D625F4A268E39F1000389D9 /* FeedbackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D625F46268E39F1000389D9 /* FeedbackView.swift */; }; A6A7FD60C795722CE2BC7D68 /* Pods_DoSport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4B2C80E4358F104D909040B /* Pods_DoSport.framework */; }; CE0A6B39258F89F5007E02CC /* SFProDisplay-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = CEDEB889258CE7F2007B2BCA /* SFProDisplay-Regular.ttf */; }; CE0A6B58258FBA26007E02CC /* CustomPageControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0A6B57258FBA26007E02CC /* CustomPageControl.swift */; }; @@ -576,6 +581,11 @@ 65EEB95F25EA023400821F8F /* SettingsDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsDataSource.swift; sourceTree = ""; }; 65EEE91825B626290023168D /* AppConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppConfiguration.swift; sourceTree = ""; }; 65FFFD622604AFB400CD1CB5 /* NetworkErrorResponseType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkErrorResponseType.swift; sourceTree = ""; }; + 6D625F39268E3908000389D9 /* DSRatingStackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DSRatingStackView.swift; sourceTree = ""; }; + 6D625F42268E39F1000389D9 /* FeedBackAssembly.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedBackAssembly.swift; sourceTree = ""; }; + 6D625F43268E39F1000389D9 /* FeedBackCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedBackCoordinator.swift; sourceTree = ""; }; + 6D625F45268E39F1000389D9 /* FeedBackViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedBackViewController.swift; sourceTree = ""; }; + 6D625F46268E39F1000389D9 /* FeedbackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedbackView.swift; sourceTree = ""; }; CE0A6B57258FBA26007E02CC /* CustomPageControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomPageControl.swift; sourceTree = ""; }; CE2B5DBF25FBB55B007E5EEA /* LoginAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginAPI.swift; sourceTree = ""; }; CE2B5DC425FBB626007E5EEA /* WKWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WKWebView.swift; sourceTree = ""; }; @@ -981,6 +991,7 @@ 6568F8DC25B4F85C00225043 /* Feed */ = { isa = PBXGroup; children = ( + 6D625F41268E39F1000389D9 /* Feedback */, 653179D625D112B3001DBA4B /* DateSelection */, 65EAAA9425CD59A9005E0131 /* Event */, 6531791D25D10DF6001DBA4B /* EventCreate */, @@ -1094,6 +1105,7 @@ 659DCA1225D933FA00D56193 /* DSSegmentedControl.swift */, 65C67E6625D557C600ABC58B /* DSSeparatorView.swift */, 658F851325E8D79600EBE6A1 /* DSSubscribtionCountView.swift */, + 6D625F39268E3908000389D9 /* DSRatingStackView.swift */, 65CD771425EB301B00D042FD /* DSSwitch.swift */, 65CC2CEB25DA899A009D6B4B /* Buttons */, 654D707D25E89EA700B37AD3 /* EventCard */, @@ -1438,6 +1450,25 @@ path = Settings; sourceTree = ""; }; + 6D625F41268E39F1000389D9 /* Feedback */ = { + isa = PBXGroup; + children = ( + 6D625F42268E39F1000389D9 /* FeedBackAssembly.swift */, + 6D625F43268E39F1000389D9 /* FeedBackCoordinator.swift */, + 6D625F44268E39F1000389D9 /* View */, + ); + path = Feedback; + sourceTree = ""; + }; + 6D625F44268E39F1000389D9 /* View */ = { + isa = PBXGroup; + children = ( + 6D625F45268E39F1000389D9 /* FeedBackViewController.swift */, + 6D625F46268E39F1000389D9 /* FeedbackView.swift */, + ); + path = View; + sourceTree = ""; + }; ADF7D3308F59CB7E81C5F884 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -1960,6 +1991,7 @@ buildActionMask = 2147483647; files = ( CE4C91E02613934D00A1B6BC /* MainSportTypeSelectionTableCell.swift in Sources */, + 6D625F3A268E3908000389D9 /* DSRatingStackView.swift in Sources */, CE4C91DF2613934500A1B6BC /* UIStackView+addArrangedSubviews.swift in Sources */, CE4C91DC2613933A00A1B6BC /* CollectionViewSportTypeCell.swift in Sources */, CE4C91D92613932C00A1B6BC /* DSAvatartImageView.swift in Sources */, @@ -2029,6 +2061,7 @@ 6503F4E325B5CDD60002BC27 /* Event.swift in Sources */, 65EAAA8A25CD4010005E0131 /* CollectionViewEventCardCellFooterView.swift in Sources */, 65CDF89A25DB12080049F711 /* SportGroundSelectionListViewController.swift in Sources */, + 6D625F4A268E39F1000389D9 /* FeedbackView.swift in Sources */, 65D973FB25B4731800769653 /* SportTypeGridViewController.swift in Sources */, 65430BEE260F98100044F57C /* FeedModel.swift in Sources */, 659C61AD2593DB5A00C33D05 /* SignUpView.swift in Sources */, @@ -2088,6 +2121,7 @@ 658E0AA825D7DDEA0013DFF5 /* UIDevide+getDeviceModel.swift in Sources */, 65B6D98726060B870099BC08 /* DSModels+SportType.swift in Sources */, 655B514225D5C007004FE90F /* SelectionCell.swift in Sources */, + 6D625F48268E39F1000389D9 /* FeedBackCoordinator.swift in Sources */, 6531799925D111FE001DBA4B /* RegionListViewModel.swift in Sources */, 65AAB2D925ACA0D000A86730 /* HideKeyboardWithAction.swift in Sources */, 653179BB25D1124C001DBA4B /* SubwayListViewController.swift in Sources */, @@ -2108,6 +2142,7 @@ 65CD77E025EB588F00D042FD /* UserReportMessageView.swift in Sources */, 655B513D25D5BFFC004FE90F /* TextViewCell.swift in Sources */, 65C080A425E1AFB200BF353B /* UISearchBar+textField.swift in Sources */, + 6D625F49268E39F1000389D9 /* FeedBackViewController.swift in Sources */, 65EEB93725E9E36300821F8F /* UserSubscriberListDataSource.swift in Sources */, 65D9742B25B487AF00769653 /* UICollectionView+cellForRow.swift in Sources */, 6587051825920A0100EFF7C7 /* SignInCoordinator.swift in Sources */, @@ -2118,6 +2153,7 @@ 654D706725E8903D00B37AD3 /* EventCardTableCell.swift in Sources */, CECEE2642610BCEB00B9AF16 /* NSNotifications.swift in Sources */, 651FBF2925FE01070018C6B1 /* MainSportTypeSelectionCoordinator.swift in Sources */, + 6D625F47268E39F1000389D9 /* FeedBackAssembly.swift in Sources */, 65B6D96426060B1D0099BC08 /* DSEnums+FeedFilterType.swift in Sources */, 6587053E2592493400EFF7C7 /* Coordinator.swift in Sources */, 653179E725D112D4001DBA4B /* DateSelectionAssembly.swift in Sources */, diff --git a/DoSport/DoSport/Flow/Feed/Feedback/View/FeedbackView.swift b/DoSport/DoSport/Flow/Feed/Feedback/View/FeedbackView.swift index ddbdeb4c..fa13b142 100644 --- a/DoSport/DoSport/Flow/Feed/Feedback/View/FeedbackView.swift +++ b/DoSport/DoSport/Flow/Feed/Feedback/View/FeedbackView.swift @@ -17,7 +17,7 @@ final class FeedbackView: UIView { private lazy var userNameLabel: UILabel = { let label = UILabel() - label.text = "User Name" + label.text = Texts.Registration.userName label.frame.size.height = 24 label.frame.size.width = 54 label.font = Fonts.sfProRegular(size: 16) @@ -142,7 +142,6 @@ extension FeedbackView: UITextViewDelegate { textView.text = Texts.FeedBack.placeholder textView.textColor = Colors.lightBlue } - checkForButtonOn() } }