Skip to content

Conversation

@DHIGHSOUL
Copy link
Collaborator

@DHIGHSOUL DHIGHSOUL commented Jun 24, 2022

요약
이번주는 인스타그램 경량화 클로닝 프로젝트를 진행하였습니다.
기본 뼈대를 잡고 CoreData를 사용하는 데이터 처리를 위주로 코드를 작성하려고 했는데, 아무래도 아직 코드 작성에 대한 전반적인 경험이 너무 부족했던 것 같습니다. 구현하지 못한 기능들을 아래에 적어두겠습니다. 아래 기능들은 이후에도 최대한 구현할 수 있도록 공부하겠습니다.
현재 작성된 코드에서 부족한 점을 가감없이 말씀해주시면 감사하겠습니다!

구현하지 못한 기능

  • CoreData -> Update/Delete
  • AddEditViewController -> DismissButton(모달 방식 미구현)
  • Send UIImage to URL(주소 형식으로 보내지 않고 jpegData()함수를 사용함)
  • 최신 피드가 가장 위로 올라오는 정렬기능
  • 좋은 AutoLayout 구성을 하지 못함(13 Pro Max를 기준으로 한 레이아웃만 잡힘)
  • etc

체크가 필요한 사항.

  • 전반적인 코드 작성에 대한 이해도가 부족한 듯함.
  • XCode 오류?로 아이폰에서 직접 사용해보지 못함.

@DHIGHSOUL DHIGHSOUL requested review from H43RO and ITlearning June 24, 2022 23:53
Copy link
Owner

@ITlearning ITlearning left a comment

Choose a reason for hiding this comment

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

코멘트한 것들 확인해주시고, 미구현 이슈들은 나중에 구현해볼 시간을 마련해보겠습니다.
Approve 는 수정 사항이 다 끝나면 진행하겠습니다.

// }
// appDelegate?.saveContext()
// }
}
Copy link
Owner

Choose a reason for hiding this comment

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

CoreData관련 기능은 제가 예전에 인스타 클론 하면서 적었던 블로그 내용을 참고해보시는 것도 나쁘지 않다고 봅니다.
https://velog.io/@kirri1124/CoreData-알아보기
저도 잘 작성한 코드는 아니었지만, 적어도 돌아는 갔습니다 ㅎㅎ

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

감사합니다! 참고해서 수정하겠습니다.


import UIKit

struct collectionViewFeed {
Copy link
Owner

Choose a reason for hiding this comment

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

Struct 네이밍은 무조건 대문자로 시작해야합니다.
https://velog.io/@hayeon/Swift-네이밍-및-개발-규칙
링크 정독 부탁드립니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

네이밍 실수가 있었네요. 더 잘 확인하겠습니다!

}()

// Cell의 화면 구성
override func layoutSubviews() {
Copy link
Owner

Choose a reason for hiding this comment

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

Cell 화면구성을 layoutSubview에서 하신 특별한 이유가 있을까요?

import UIKit
import SnapKit
import CoreData
import AVFoundation
Copy link
Owner

Choose a reason for hiding this comment

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

AVFoundation을 import 한 이유가 있을까요?
만일 사용하지 않는 라이브러리라면 제거해주시는게 맞습니당!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

AVFoundation이 PHphotoLibrary로 사용자의 갤러리 사용 승인 여부를 확인할 수 있다고 해서 넣어뒀었습니다. 다른 방법을 찾아서 적용하겠습니다!

feedCell.feedImageView.image = UIImage(data: newFeedForCell[indexPath.row].feedImage!)
feedCell.feedText.text = newFeedForCell[indexPath.row].feedText
feedCell.feedLikeCount.text = newFeedForCell[indexPath.row].likeCount
feedCell.feedUploadDate.text = newFeedForCell[indexPath.row].uploadDate
Copy link
Owner

Choose a reason for hiding this comment

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

위 로직들을 cell안에서 처리할 수 있게끔 바꿔주는게 좋을 것 같네요!

guard let collectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: UserProfileViewCollectionCustomCell.collectionViewCellIdentifier, for: indexPath) as? UserProfileViewCollectionCustomCell else { return UICollectionViewCell() }
let newFeedForCollectionViewCell = CoreDataManager.shared.getFeeds()

collectionViewCell.feedImage.image = UIImage(data: newFeedForCollectionViewCell[indexPath.row].feedImage!)
Copy link
Owner

Choose a reason for hiding this comment

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

이것두 마찬가지로 수정해주시면 감사하겠습니다 :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

위 코드와 함께 각각 Custom Cell 파일에서 처리하도록 만들어보겠습니다! 이 같은 경우에도 매개변수를 사용해서 Custom Cell Model 쪽에서 처리한 후 ViewController로 보내는 편이 좋을까요?

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.

3 participants