-
Notifications
You must be signed in to change notification settings - Fork 0
이번주 공부내용 #14
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
base: main
Are you sure you want to change the base?
이번주 공부내용 #14
Conversation
ITlearning
left a comment
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.
코멘트한 것들 확인해주시고, 미구현 이슈들은 나중에 구현해볼 시간을 마련해보겠습니다.
Approve 는 수정 사항이 다 끝나면 진행하겠습니다.
| // } | ||
| // appDelegate?.saveContext() | ||
| // } | ||
| } |
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.
CoreData관련 기능은 제가 예전에 인스타 클론 하면서 적었던 블로그 내용을 참고해보시는 것도 나쁘지 않다고 봅니다.
https://velog.io/@kirri1124/CoreData-알아보기
저도 잘 작성한 코드는 아니었지만, 적어도 돌아는 갔습니다 ㅎㅎ
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 | ||
|
|
||
| struct collectionViewFeed { |
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.
Struct 네이밍은 무조건 대문자로 시작해야합니다.
https://velog.io/@hayeon/Swift-네이밍-및-개발-규칙
링크 정독 부탁드립니다!
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.
네이밍 실수가 있었네요. 더 잘 확인하겠습니다!
| }() | ||
|
|
||
| // Cell의 화면 구성 | ||
| override func layoutSubviews() { |
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.
Cell 화면구성을 layoutSubview에서 하신 특별한 이유가 있을까요?
| import UIKit | ||
| import SnapKit | ||
| import CoreData | ||
| import AVFoundation |
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.
AVFoundation을 import 한 이유가 있을까요?
만일 사용하지 않는 라이브러리라면 제거해주시는게 맞습니당!
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.
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 |
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.
위 로직들을 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!) |
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.
위 코드와 함께 각각 Custom Cell 파일에서 처리하도록 만들어보겠습니다! 이 같은 경우에도 매개변수를 사용해서 Custom Cell Model 쪽에서 처리한 후 ViewController로 보내는 편이 좋을까요?
요약
이번주는 인스타그램 경량화 클로닝 프로젝트를 진행하였습니다.
기본 뼈대를 잡고 CoreData를 사용하는 데이터 처리를 위주로 코드를 작성하려고 했는데, 아무래도 아직 코드 작성에 대한 전반적인 경험이 너무 부족했던 것 같습니다. 구현하지 못한 기능들을 아래에 적어두겠습니다. 아래 기능들은 이후에도 최대한 구현할 수 있도록 공부하겠습니다.
현재 작성된 코드에서 부족한 점을 가감없이 말씀해주시면 감사하겠습니다!
구현하지 못한 기능
체크가 필요한 사항.