Skip to content

Commit

Permalink
chore #51: 디자인 세부조정
Browse files Browse the repository at this point in the history
  • Loading branch information
enebin committed Aug 18, 2023
1 parent 5b89512 commit 2b5cbf2
Show file tree
Hide file tree
Showing 41 changed files with 367 additions and 410 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ import SwiftUI
public extension Animation {
// 테스트하고프면 https://www.cssportal.com/css-cubic-bezier-generator/
static func customInteractiveSpring(duration: CGFloat = 0.5) -> Animation {
.timingCurve(0.175, 0.885, 0.32, 1.05, duration: 0.5) // default: 0.5
.timingCurve(0.175, 0.885, 0.32, 1.05, duration: duration) // default: 0.5
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "유머.png",
"filename" : "affection.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "센스.png",
"filename" : "body.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "신체.png",
"filename" : "emotional.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "애정.png",
"filename" : "food.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "humor.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "inteligence.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "money.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "passion.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "planning.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "relationship.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "sense.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 4 additions & 5 deletions Projects/DSKit/Sources/Button/SegmentControlView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
import SwiftUIIntrospect
import Core

public struct SegmentControlView<SegmentType: Identifiable, Content: View>: View {
public struct SegmentControlView<SegmentType: Identifiable, Content: View>: View where SegmentType: Equatable {
let segments: [SegmentType]
@Binding var selected: SegmentType

Expand Down Expand Up @@ -51,6 +51,7 @@ public struct SegmentControlView<SegmentType: Identifiable, Content: View>: View
.frame(width: bounds.size.width / CGFloat(segments.count))
}
}
.animation(Animation.customInteractiveSpring(), value: selected)
}
.padding(4)

Expand Down Expand Up @@ -82,9 +83,7 @@ extension SegmentControlView {
GeometryReader { bounds in
Button(action: {
HapticManager.shared.tok()
withAnimation(Animation.customInteractiveSpring()) {
selectedId = id
}
selectedId = id
}) {
content()
}
Expand All @@ -104,7 +103,7 @@ extension SegmentControlView {
}
}

public enum Segment: Identifiable, CaseIterable {
public enum MyPageSegment: Identifiable, CaseIterable, Equatable {
case similar, different

public var id: String {
Expand Down
Loading

0 comments on commit 2b5cbf2

Please sign in to comment.