Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into feature/Router
Browse files Browse the repository at this point in the history
  • Loading branch information
syss220211 committed Jun 18, 2024
2 parents 16bc92d + 87db988 commit e28913c
Show file tree
Hide file tree
Showing 25 changed files with 236 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// AnotherView.swift
// App
//
// Created by 박서연 on 2024/06/13.
// Copyright © 2024 iOS. All rights reserved.
//

import SwiftUI

struct AnotherView: View {
var body: some View {
Text("Saaaaample Viewwwwww")
}
}

#Preview {
AnotherView()
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import SwiftUI
import DesignSystem

enum Tabbar: CaseIterable {
case home, category, mypage
Expand Down Expand Up @@ -40,14 +41,25 @@ enum Tabbar: CaseIterable {
}
}

var image: String {
var image_default: Image {
switch self {
case .home:
"house"
ZerosomeTab.ic_home
case .category:
"star.fill"
ZerosomeTab.ic_category
case .mypage:
"heart.fill"
ZerosomeTab.ic_mypage
}
}

var image_fill: Image {
switch self {
case .home:
ZerosomeTab.ic_home_fill
case .category:
ZerosomeTab.ic_category_fill
case .mypage:
ZerosomeTab.ic_mpyage_fill
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import SwiftUI
import DesignSystem

struct TabbarView: View {
@ObservedObject var viewModel: TabbarViewModel
Expand All @@ -23,11 +24,11 @@ struct TabbarView: View {
HStack {
ForEach(Tabbar.allCases, id: \.self) { item in
VStack(spacing: 5) {
Image(systemName: item.image)
(viewModel.selected == item ? item.image_fill : item.image_default)
.frame(width: 24, height: 24)
Text(item.title)
.applyFont(font: .label1)
.foregroundStyle(Color.neutral400)
.foregroundStyle(viewModel.selected == item ? Color.primaryFF6972 : Color.neutral400)
}
.frame(maxWidth: .infinity, alignment: .center)
.contentShape(Rectangle())
Expand Down
2 changes: 1 addition & 1 deletion Projects/DesignSystem/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ let designSystemTarget = Target.makeTarget(
let designSystemProject = Project.makeProject(
name: "DesignSystem",
targets: designSystemTarget,
isXconfigSet: true)
isXconfigSet: false)

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.251",
"green" : "0.251",
"red" : "1.000"
"blue" : "0.149",
"green" : "0.192",
"red" : "0.984"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "progress_gray.svg",
"idiom" : "universal"
}
],
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "ic_category_empty.svg",
"idiom" : "universal"
}
],
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "ic_category_fill.svg",
"idiom" : "universal"
}
],
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "ic_home_empty.svg",
"idiom" : "universal"
}
],
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "ic_home_fill.svg",
"idiom" : "universal"
}
],
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "ic_mypage_empty.svg",
"idiom" : "universal"
}
],
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "ic_mypage_fill.svg",
"idiom" : "universal"
}
],
"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.
23 changes: 23 additions & 0 deletions Projects/DesignSystem/Sources/Assets/AssestsTestView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// AssestsTestView.swift
// DesignSystem
//
// Created by 박서연 on 2024/06/18.
// Copyright © 2024 iOS. All rights reserved.
//

import SwiftUI

struct AssestsTestView: View {
var body: some View {
VStack {
ZerosomeTab.ic_home
ZerosomeAsset.zero_progress
}
.background(.green)
}
}

#Preview {
AssestsTestView()
}
13 changes: 13 additions & 0 deletions Projects/DesignSystem/Sources/Assets/Common/Common+Assests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Common+Assests.swift
// DesignSystem
//
// Created by 박서연 on 2024/06/18.
// Copyright © 2024 iOS. All rights reserved.
//

import SwiftUI

public struct ZerosomeAsset {
public static let zero_progress = DesignSystemAsset.Assets.progressGray.swiftUIImage
}
18 changes: 18 additions & 0 deletions Projects/DesignSystem/Sources/Assets/Tab/Tabbar.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// Tabbar.swift
// DesignSystem
//
// Created by 박서연 on 2024/06/18.
// Copyright © 2024 iOS. All rights reserved.
//

import SwiftUI

public enum ZerosomeTab {
public static let ic_home = DesignSystemAsset.Assets.icHomeEmpty.swiftUIImage
public static let ic_home_fill = DesignSystemAsset.Assets.icHomeFill.swiftUIImage
public static let ic_category = DesignSystemAsset.Assets.icCategoryEmpty.swiftUIImage
public static let ic_category_fill = DesignSystemAsset.Assets.icCategoryFill.swiftUIImage
public static let ic_mypage = DesignSystemAsset.Assets.icMypageEmpty.swiftUIImage
public static let ic_mpyage_fill = DesignSystemAsset.Assets.icMypageFill.swiftUIImage
}
13 changes: 10 additions & 3 deletions Projects/DesignSystem/Sources/Font/Font.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Created by 박서연 on 2024/05/12.
// Copyright © 2024 iOS. All rights reserved.
//
import UIKit
import SwiftUI

public enum ZSFont {
Expand All @@ -16,6 +15,7 @@ public enum ZSFont {
case body1
case body2
case body3
case body4
case label1
case label2
case caption
Expand All @@ -39,6 +39,8 @@ extension ZSFont {
return DesignSystemFontFamily.Pretendard.medium.name
case .body3:
return DesignSystemFontFamily.Pretendard.medium.name
case .body4:
return DesignSystemFontFamily.Pretendard.medium.name
case .label1:
return DesignSystemFontFamily.Pretendard.medium.name
case .label2:
Expand All @@ -64,8 +66,10 @@ extension ZSFont {
return 14
case .body3:
return 13
case .label1:
case .body4:
return 12
case .label1:
return 13
case .label2:
return 11
case .caption:
Expand All @@ -89,6 +93,8 @@ extension ZSFont {
return CGFloat(ZSFont.body2.size * 0.140)
case .body3:
return CGFloat(ZSFont.body2.size * 0.140)
case .body4:
return CGFloat(ZSFont.body2.size * 0.140)
case .label1:
return CGFloat(ZSFont.label1.size * 0.140)
case .label2:
Expand All @@ -114,6 +120,8 @@ extension ZSFont {
return 0
case .body3:
return 0
case .body4:
return 0
case .label1:
return 0
case .label2:
Expand All @@ -126,7 +134,6 @@ extension ZSFont {
public var toUIFont: UIFont {
return UIFont(name: self.name, size: self.size) ?? UIFont.systemFont(ofSize: self.size)
}

}

public struct FontModifier: ViewModifier {
Expand Down

0 comments on commit e28913c

Please sign in to comment.