Skip to content

Feature/mvc#2

Open
devffrey wants to merge 32 commits into
developfrom
feature/mvc
Open

Feature/mvc#2
devffrey wants to merge 32 commits into
developfrom
feature/mvc

Conversation

@devffrey

@devffrey devffrey commented Nov 9, 2020

Copy link
Copy Markdown
Owner

MVC쪽 작업해서 올립니다.
ReactorKit 부분은 Rx때문에 올린거라 참고용으로만 봐주세요!

@devffrey

devffrey commented Nov 9, 2020

Copy link
Copy Markdown
Owner Author

???

}

override func clickToBackButton() {
self.navigationController?.popViewController(animated: true)

@szzang-kr szzang-kr Nov 12, 2020

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ClickToBackButton 의 동작중
self.navigationController?.popViewController(animated: true) 는 모두 동일할것 같은데,
BaseDetailView 에 작성해도 되지않을까요 ?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

원래 해당 함수의 목적이,
DetailView에서 URL부분을 클릭하면 웹뷰 화면으로 이동을 시키고,
다시 뒤로 2번 이동해서 List로 돌아왔을 때,
해당 cell에 읽음 표시를 나타내는 dim view를 활성화 시키기 위한 callback 데이터를 전달하기 위해서 만들었습니다.

근데 제가 이 부분을 놓친거 같아서,
수정해서 반영해두겠습니다

szzang-kr
szzang-kr previously approved these changes Nov 12, 2020
- Note: Cell Model 정보를 Cell에 구성
*/
func configure(model: SearchResultCellModel) {
self.thumbnailView.kf.setImage(with: model.thumbnailURL, placeholder: UIImage(named: "placeholder"), options: [.transition(.fade(0.3))])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self. 가 없어도 괜찮지 않나요??

self.가 없어도 될때엔 없는편이 코드가 깔끔해 보이더라구요! :)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

말씀주신 것처럼 self.이 안 붙는게 더 깔끔하고 굳이 안 적어도 되는 부분을 적은 것 같아서,
수정하겠습니다~


//MARK: - Bind
func bind(reactor: ReactorKitListReactor) {
// action

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bind 안의 내용들을 func로 분리하면 더 읽기 편할 것 같아요!

@devffrey devffrey Nov 13, 2020

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 action, state 등을 따로 구분해서 관리하면 가독성에 더 좋겠네요!
좋은 지적 감사합니다 ㅎㅎㅎㅎ

let data = moyaResponse.data.decode(SearchResult.self)
completion(data, nil)
}
break;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

특수한 상황이 아니라면 break는 없어도 되는 코드! :(

저도 많이 혼났던 부분 ㅠㅠ

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최근에 다른 언어를 사용하다보니 break에다가 세미콜론까지..........ㅠㅠㅠ
고쳐두겠씁니다.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants