Skip to content

Commit

Permalink
Merge pull request #83 from Drink-Easy/HZOO
Browse files Browse the repository at this point in the history
#82 Feat: New 홈화면 오토레이아웃 전까지
  • Loading branch information
doyeonk429 authored Oct 2, 2024
2 parents 2016699 + 36dcb9d commit b983243
Show file tree
Hide file tree
Showing 29 changed files with 249 additions and 243 deletions.
16 changes: 8 additions & 8 deletions Drink-EG/Drink-EG.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
16C19ADE2C73AF6000E93FD0 /* UserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16C19ADD2C73AF6000E93FD0 /* UserDefaults.swift */; };
16C19AE12C74423300E93FD0 /* SwiftyToaster in Frameworks */ = {isa = PBXBuildFile; productRef = 16C19AE02C74423300E93FD0 /* SwiftyToaster */; };
16C19AE62C74987600E93FD0 /* YouTubeiOSPlayerHelper in Frameworks */ = {isa = PBXBuildFile; productRef = 16C19AE52C74987600E93FD0 /* YouTubeiOSPlayerHelper */; };
16C19B0B2C7DA80C00E93FD0 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 16C19B0A2C7DA80C00E93FD0 /* Realm */; };
16C19B0D2C7DA80C00E93FD0 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 16C19B0C2C7DA80C00E93FD0 /* RealmSwift */; };
16C19B102C7DB73200E93FD0 /* Then in Frameworks */ = {isa = PBXBuildFile; productRef = 16C19B0F2C7DB73200E93FD0 /* Then */; };
16C19B162C7DB88100E93FD0 /* Note.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16C19B152C7DB88100E93FD0 /* Note.swift */; };
Expand Down Expand Up @@ -125,6 +124,8 @@
1FBD19532C6CFABB005C16A8 /* WineShopListCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FBD19522C6CFABB005C16A8 /* WineShopListCollectionViewCell.swift */; };
1FBD19552C6D2BF7005C16A8 /* ReviewListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FBD19542C6D2BF7005C16A8 /* ReviewListViewController.swift */; };
1FBD19572C6DDBAB005C16A8 /* ReviewListCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FBD19562C6DDBAB005C16A8 /* ReviewListCollectionViewCell.swift */; };
1FC522272CA91ED000EC0635 /* TabBarShadow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FC522262CA91ED000EC0635 /* TabBarShadow.swift */; };
1FC522292CA933FC00EC0635 /* MenuCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FC522282CA933FC00EC0635 /* MenuCollectionViewCell.swift */; };
5E22192D2C69D592005849FB /* Pretendard-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 5E2219242C69D592005849FB /* Pretendard-Bold.otf */; };
5E22192E2C69D592005849FB /* Pretendard-Black.otf in Resources */ = {isa = PBXBuildFile; fileRef = 5E2219252C69D592005849FB /* Pretendard-Black.otf */; };
5E22192F2C69D592005849FB /* Pretendard-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 5E2219262C69D592005849FB /* Pretendard-Regular.otf */; };
Expand Down Expand Up @@ -293,6 +294,8 @@
1FBD19522C6CFABB005C16A8 /* WineShopListCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WineShopListCollectionViewCell.swift; sourceTree = "<group>"; };
1FBD19542C6D2BF7005C16A8 /* ReviewListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewListViewController.swift; sourceTree = "<group>"; };
1FBD19562C6DDBAB005C16A8 /* ReviewListCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewListCollectionViewCell.swift; sourceTree = "<group>"; };
1FC522262CA91ED000EC0635 /* TabBarShadow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarShadow.swift; sourceTree = "<group>"; };
1FC522282CA933FC00EC0635 /* MenuCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuCollectionViewCell.swift; sourceTree = "<group>"; };
5E2219242C69D592005849FB /* Pretendard-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Bold.otf"; sourceTree = "<group>"; };
5E2219252C69D592005849FB /* Pretendard-Black.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Black.otf"; sourceTree = "<group>"; };
5E2219262C69D592005849FB /* Pretendard-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Regular.otf"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -333,7 +336,6 @@
buildActionMask = 2147483647;
files = (
16C19B0D2C7DA80C00E93FD0 /* RealmSwift in Frameworks */,
16C19B0B2C7DA80C00E93FD0 /* Realm in Frameworks */,
164A0A132CA3AED700504BF1 /* SDWebImageMapKit in Frameworks */,
5E2219712C6B5B5B005849FB /* Cosmos in Frameworks */,
5E22195E2C69DDB5005849FB /* SnapKit in Frameworks */,
Expand Down Expand Up @@ -475,6 +477,7 @@
16C19AD12C73AE0200E93FD0 /* UIView.swift */,
16C19ADD2C73AF6000E93FD0 /* UserDefaults.swift */,
5E42B0172C74A39300DAB751 /* MovingTextField.swift */,
1FC522262CA91ED000EC0635 /* TabBarShadow.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -669,6 +672,7 @@
1F598F022C581A7D000CE79F /* StartLoginCollectionViewCell.swift */,
1F598EEB2C524D2E000CE79F /* RecomCollectionViewCell.swift */,
1F205A302C68BB5200E80659 /* CartListCollectionViewCell.swift */,
1FC522282CA933FC00EC0635 /* MenuCollectionViewCell.swift */,
);
path = Main;
sourceTree = "<group>";
Expand Down Expand Up @@ -865,7 +869,6 @@
5E2219702C6B5B5B005849FB /* Cosmos */,
16C19AE02C74423300E93FD0 /* SwiftyToaster */,
16C19AE52C74987600E93FD0 /* YouTubeiOSPlayerHelper */,
16C19B0A2C7DA80C00E93FD0 /* Realm */,
16C19B0C2C7DA80C00E93FD0 /* RealmSwift */,
16C19B0F2C7DB73200E93FD0 /* Then */,
164A0A102CA3AED700504BF1 /* SDWebImage */,
Expand Down Expand Up @@ -965,6 +968,7 @@
16752F9D2C5A7FB90001907D /* HexCode.swift in Sources */,
1F598F0B2C5CBD9E000CE79F /* EnterTasteTestViewController.swift in Sources */,
1F8F99FA2C6F538300EAEF6C /* WineInfoResponse.swift in Sources */,
1FC522272CA91ED000EC0635 /* TabBarShadow.swift in Sources */,
5E22196E2C6B2EA0005849FB /* RatingViewController.swift in Sources */,
1F205A432C6B66EB00E80659 /* TasteTestThirdCollectionViewCell.swift in Sources */,
1F8FECB32C74777B00704491 /* WineLikeRequest.swift in Sources */,
Expand All @@ -974,6 +978,7 @@
5E23147F2C5901BB004E2013 /* (null) in Sources */,
16B97D162C4C0F6400D8B453 /* SavingVideoViewController.swift in Sources */,
165400F82C69EFBD008A9DBF /* WineNewsResponse.swift in Sources */,
1FC522292CA933FC00EC0635 /* MenuCollectionViewCell.swift in Sources */,
165400E92C69DDCB008A9DBF /* WineClassAPI.swift in Sources */,
1F598EEA2C5227C5000CE79F /* AdImageCollectionViewCell.swift in Sources */,
1F205A412C6B540600E80659 /* TasteTestSecondCollectionViewCell.swift in Sources */,
Expand Down Expand Up @@ -1405,11 +1410,6 @@
package = 16C19AE42C74987600E93FD0 /* XCRemoteSwiftPackageReference "youtube-ios-player-helper" */;
productName = YouTubeiOSPlayerHelper;
};
16C19B0A2C7DA80C00E93FD0 /* Realm */ = {
isa = XCSwiftPackageProductDependency;
package = 16C19B092C7DA80C00E93FD0 /* XCRemoteSwiftPackageReference "realm-swift" */;
productName = Realm;
};
16C19B0C2C7DA80C00E93FD0 /* RealmSwift */ = {
isa = XCSwiftPackageProductDependency;
package = 16C19B092C7DA80C00E93FD0 /* XCRemoteSwiftPackageReference "realm-swift" */;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "자막 중.png",
"filename" : "자막 중.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "자막 중@2x.png",
"filename" : "자막 중@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "자막 중@3x.png",
"filename" : "자막 중@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "ion_search.png",
"filename" : "search.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ion_search (1).png",
"filename" : "search@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ion_search (2).png",
"filename" : "search@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Rectangle 261.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Drink-EG/Drink-EG/Resources/Extensions/TabBarShadow.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// TabBarShadow.swift
// Drink-EG
//
// Created by 이현주 on 9/29/24.
//

import Foundation
import UIKit

extension CALayer {
// Sketch 스타일의 그림자를 생성하는 유틸리티 함수
func applyShadow(
color: UIColor = .black,
alpha: Float = 0.5,
x: CGFloat = 0,
y: CGFloat = 2,
blur: CGFloat = 4
) {
shadowColor = color.cgColor
shadowOpacity = alpha
shadowOffset = CGSize(width: x, height: y)
shadowRadius = blur / 2.0
}
}

extension UITabBar {
// 기본 그림자 스타일을 초기화해야 커스텀 스타일을 적용할 수 있다.
static func clearShadow() {
UITabBar.appearance().shadowImage = UIImage()
UITabBar.appearance().backgroundImage = UIImage()
UITabBar.appearance().backgroundColor = UIColor.white
}
}
2 changes: 1 addition & 1 deletion Drink-EG/Drink-EG/Resources/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
// 화면을 구성하는 UIWindow 인스턴스 생성
let window = UIWindow(windowScene: windowScene)
// 실제 첫 화면이 되는 MainViewController 인스턴스 생성
let vc = EnterLoginViewController()
let vc = LoginViewController()
// NavigationController을 사용할 경우, MainViewController를 rootViewController로 갖는 NavigationController을 생성해야한다.
let navigationController = UINavigationController(rootViewController: vc)
navigationController.isNavigationBarHidden = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class AdImageCollectionViewCell : UICollectionViewCell {

private func setupUI() {
self.contentView.addSubview(imageView)
self.contentView.layer.cornerRadius = 16
self.contentView.layer.masksToBounds = true

imageView.snp.makeConstraints { make in
make.edges.equalToSuperview()
Expand Down
58 changes: 58 additions & 0 deletions Drink-EG/Drink-EG/Sources/Cells/Main/MenuCollectionViewCell.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// MenuCollectionViewCell.swift
// Drink-EG
//
// Created by 이현주 on 9/29/24.
//

import UIKit

class MenuCollectionViewCell: UICollectionViewCell {

private let menuImage: UIImageView = {
let iv = UIImageView()
iv.backgroundColor = UIColor(hex: "D9D9D9")
return iv
}()

private let menuName: UILabel = {
let l1 = UILabel()
l1.font = .systemFont(ofSize: 12, weight: .regular)
l1.textColor = .black
l1.textAlignment = .center
//l1.numberOfLines = 2
return l1
}()

override init(frame: CGRect) {
super.init(frame: frame)

setupUI()
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

//레이아웃까지
private func setupUI() {
self.contentView.addSubview(menuImage)
self.contentView.addSubview(menuName)
self.contentView.layer.cornerRadius = 5
self.contentView.layer.masksToBounds = true


menuImage.snp.makeConstraints { make in
make.edges.equalToSuperview()
}

menuName.snp.makeConstraints { make in
make.leading.trailing.equalToSuperview().inset(5)
make.bottom.equalToSuperview().inset(2)
}
}

func configure(name: String) {
menuName.text = name
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class RecomCollectionViewCell: UICollectionViewCell {
private let label1: UILabel = {
let l1 = UILabel()
l1.font = .systemFont(ofSize: 13, weight: .bold)
l1.textColor = .black
l1.textColor = .white
l1.numberOfLines = 2
//l1.adjustsFontSizeToFitWidth = true
l1.lineBreakMode = .byTruncatingTail // 생략 부호(...)가 꼬리에 위치하도록 설정
Expand All @@ -29,7 +29,7 @@ class RecomCollectionViewCell: UICollectionViewCell {

private let view: UIView = {
let v = UIView()
v.backgroundColor = UIColor(hue: 0.0417, saturation: 0.19, brightness: 1, alpha: 0.7)
v.backgroundColor = UIColor(hue: 0.7389, saturation: 0.89, brightness: 0.69, alpha: 0.7)
return v
}()

Expand Down
Loading

0 comments on commit b983243

Please sign in to comment.