-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
373 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
runs-on: macos-15 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...Presentation/MHPresentation/Resource/Images.xcassets/BookMakeImage.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Subject.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+5.53 KB
...tion/MHPresentation/Resource/Images.xcassets/BookMakeImage.imageset/Subject.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.5 KB
...n/MHPresentation/Resource/Images.xcassets/BookMakeImage.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.5 KB
...n/MHPresentation/Resource/Images.xcassets/BookMakeImage.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...ntation/MHPresentation/Resource/Images.xcassets/DotHorizontalImage.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "image 19.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "image [email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "image [email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+734 Bytes
...HPresentation/Resource/Images.xcassets/DotHorizontalImage.imageset/image 19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.38 KB
...esentation/Resource/Images.xcassets/DotHorizontalImage.imageset/image [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.58 KB
...esentation/Resource/Images.xcassets/DotHorizontalImage.imageset/image [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...Presentation/MHPresentation/Resource/Images.xcassets/DropDownImage.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Vector 17.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "Vector [email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "Vector [email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+397 Bytes
...on/MHPresentation/Resource/Images.xcassets/DropDownImage.imageset/Vector 17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+646 Bytes
...MHPresentation/Resource/Images.xcassets/DropDownImage.imageset/Vector [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+891 Bytes
...MHPresentation/Resource/Images.xcassets/DropDownImage.imageset/Vector [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...Presentation/MHPresentation/Resource/Images.xcassets/LikeFillImage.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Favorite_duotone.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+600 Bytes
...esentation/Resource/Images.xcassets/LikeFillImage.imageset/Favorite_duotone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.05 KB
...ntation/Resource/Images.xcassets/LikeFillImage.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.42 KB
...ntation/Resource/Images.xcassets/LikeFillImage.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
23 changes: 23 additions & 0 deletions
23
...resentation/MHPresentation/Resource/Images.xcassets/likeEmptyImage.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Favorite.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+490 Bytes
...on/MHPresentation/Resource/Images.xcassets/likeEmptyImage.imageset/Favorite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+857 Bytes
...MHPresentation/Resource/Images.xcassets/likeEmptyImage.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.21 KB
...MHPresentation/Resource/Images.xcassets/likeEmptyImage.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
MemorialHouse/MHPresentation/MHPresentation/Source/Extensions/UIImage+Resize.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import UIKit | ||
|
||
extension UIImage { | ||
static func resizedImage(image: UIImage, size: CGSize) -> UIImage { | ||
let renderer = UIGraphicsImageRenderer(size: size) | ||
|
||
return renderer.image { _ in | ||
image.draw(in: CGRect(origin: .zero, size: size)) | ||
} | ||
} | ||
} |
85 changes: 85 additions & 0 deletions
85
MemorialHouse/MHPresentation/MHPresentation/Source/Home/BookCollectionViewCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import UIKit | ||
|
||
final class BookCollectionViewCell: UICollectionViewCell { | ||
// MARK: - Properties | ||
private let bookCoverView = MHBookCover() | ||
private let likeButton = UIButton(type: .custom) | ||
private let dropDownButton = UIButton(type: .custom) | ||
|
||
// MARK: - Initializer | ||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
configureAddSubView() | ||
configureAction() | ||
configureConstraints() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
|
||
configureAddSubView() | ||
configureAction() | ||
configureConstraints() | ||
} | ||
|
||
override func prepareForReuse() { | ||
super.prepareForReuse() | ||
|
||
bookCoverView.resetProperties() | ||
likeButton.imageView?.image = nil | ||
} | ||
|
||
// MARK: - Configuration | ||
func configure( | ||
title: String, | ||
bookCoverImage: UIImage, | ||
targetImage: UIImage, | ||
isLike: Bool, | ||
// category: String, // TODO: 카테고리 처리 생각해보기 | ||
houseName: String | ||
) { | ||
bookCoverView.configure( | ||
title: title, | ||
bookCoverImage: bookCoverImage, | ||
targetImage: targetImage, | ||
houseName: houseName | ||
) | ||
|
||
let likeImage = UIImage.resizedImage( | ||
image: isLike ? .likeFill : .likeEmpty, | ||
size: CGSize(width: 28, height: 28) | ||
) | ||
likeButton.setImage(likeImage, for: .normal) | ||
dropDownButton.setImage(.dotHorizontal, for: .normal) | ||
} | ||
|
||
private func configureAddSubView() { | ||
contentView.addSubview(bookCoverView) | ||
contentView.addSubview(likeButton) | ||
contentView.addSubview(dropDownButton) | ||
} | ||
|
||
private func configureAction() { | ||
likeButton.addAction(UIAction { _ in | ||
// TODO: 좋아요 버튼 로직 | ||
}, for: .touchUpInside) | ||
|
||
dropDownButton.addAction(UIAction { _ in | ||
// TODO: UI Menu 띄우기 | ||
}, for: .touchUpInside) | ||
} | ||
|
||
private func configureConstraints() { | ||
bookCoverView.fillSuperview() | ||
likeButton.setAnchor( | ||
top: bookCoverView.bottomAnchor, | ||
trailing: dropDownButton.leadingAnchor, constantTrailing: 10 | ||
) | ||
dropDownButton.setAnchor( | ||
trailing: contentView.trailingAnchor, constantTrailing: 4, | ||
width: 24, height: 16 | ||
) | ||
dropDownButton.setCenterY(view: likeButton) | ||
} | ||
} |
Oops, something went wrong.