-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 신고 기능 구현 #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 신고 기능 구현 #212
Conversation
DTO 사용하셔도 상관없긴 한데, bodyparameter를 [String: Any] 로 선언해서 사용하면 되지 않나요? |
iOS/Layover/Layover/Scenes/Playback/PlaybackViewController.swift
Outdated
Show resolved
Hide resolved
let button: UIButton = UIButton() | ||
button.setImage(UIImage(systemName: "ellipsis"), for: .normal) | ||
let barButtonItem: UIBarButtonItem = UIBarButtonItem(customView: button) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UIBarButtonItem 생성자 중에 이미지를 지정해서 생성하는 생성자가 있는데 따로 UIButton을 생성하고 커스텀 뷰로 넣으신 이유가 있나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이미지를 회전시켜야 해서 그렇습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그러면 UIImageView가 아닌 UIButton을 사용하신 이유가 있나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아니면 figma 애셋을 가져다 쓰셔도....ㅋㅋㅋㅋ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저런식으로 UIButton을 넣어줘야 터치를 인식하더라구요 UIImageView도 넣어봤는데 회전시키면 점들이 늘어나서. 디자인 상 Figma 에셋 가져다 쓰면 크기 맞추기가 넘 힘들어성 SF Symbol 써서 사용하고 싶었습니다. 흑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이상하네요... UIBarButtonItem도 버튼인데... 터치가...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imageView넣고 userInteraction false 해줬는데도 그러드라구요 왜인지 모르겠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거는 머지하고 나서 저도 살펴보고 확인할게요!
iOS/Layover/Layover/Scenes/Playback/PlaybackViewController.swift
Outdated
Show resolved
Hide resolved
[String:Any] 타입이 아닌 DTO로 사용한 이유는 Any타입으로 두는 것 보다 타입 명시를 선호하기 때문입니다. Any로 바꾸는 편이 좋다고 보시나요? |
일관성 때문에 그렇긴 하지만, 지금 방식도 무방하다고 생각합니다! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다....! 앞으로 함께 더 고생해봐요ㅠㅠ
|
||
import UIKit | ||
|
||
final class LOPopUpView: UIView { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
먼가 컴포넌트 이름은 팝업뷰라서 어느 팝업에나 쓸 수 있을 것 같은데
정말 신고 팝업의 기능만 하는 느낌이라 나중에 좀 더 외부에서 커스텀할 수 있게 바꿔봐도 좋을 것 같아요 !
지금은 팝업이 신고밖에 없어서 상관 없겠지만,,,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나중에 팝업을 또 쓸 경우가 생기면.... 수정 해보겠읍니다...
self.reportViews.forEach { reportView in | ||
if reportView.index == tempView.index { | ||
reportView.onRadio() | ||
guard let reportContentStr: String = reportView.contentLabel.text else { return } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Str....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Text?👀
@@ -10,6 +10,7 @@ import UIKit | |||
|
|||
final class PlaybackCell: UICollectionViewCell { | |||
let playbackView: PlaybackView = PlaybackView() | |||
var boardId: Int = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엇 저는 boardID로 했는데 갑자기 컨벤션이 헷갈려요... 어떻게 하기로 했더라
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ID로 갈게요
viewModel = Models.ReportPlaybackVideo.ViewModel(reportMessage: .success) | ||
} else { | ||
viewModel = Models.ReportPlaybackVideo.ViewModel(reportMessage: .fail) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이고 그냥 response.reportResult ? .success : .fail
하면 안되나예
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니💵
🧑🚀 PR 요약
�- [x] 신고 기능 구현
실제 서버에도 보내려 했는데 Mock이 너무 많이 연결되어있어서 어디서 부터 잘못된건지 몰겠습니다.
일단 Mock으로 연결해두었습니다.
📌 변경 사항
기존에 body Parameters를 다 String Dictionary로 사용했는데 이번 boardId key의 value가 Int인 관계로 DTO로 넘겼슴다.
📸 ScreenShot
Simulator.Screen.Recording.-.iPhone.13.mini.-.2023-12-05.at.18.24.10.mp4
Linked Issue
close #175