Skip to content

Commit

Permalink
Merge pull request #21 from gdsc-ssu/feat/#19
Browse files Browse the repository at this point in the history
Feat/#19
  • Loading branch information
hye0njuoo authored Jan 20, 2024
2 parents a1b091d + 07d3f96 commit 92d30de
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ struct DynamicislandWidgetLiveActivity: Widget {
ActivityConfiguration(for: DynamicislandWidgetAttributes.self) { context in
// Lock screen/banner UI goes here
VStack {
Text("\(context.state.time)")
Text("다음초콜릿까지 남은시간:\(context.state.time) 🤤")
ProgressView("", value: (context.attributes.totalTime - (Double(context.state.intTime))) / context.attributes.totalTime)
}
.padding()
//.activityBackgroundTint(Color.gray)
//.activitySystemActionForegroundColor(Color.black)

Expand All @@ -40,10 +42,6 @@ struct DynamicislandWidgetLiveActivity: Widget {
DynamicIslandExpandedRegion(.center) {
VStack{
HStack{
Image("m&m0")
.resizable()
.scaledToFit()
.frame(width: 20,height: 20)
Text("남은시간😋:\(context.state.time)")
}
HStack{
Expand Down
4 changes: 2 additions & 2 deletions Sweety/Sweety.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
E53E77DE2B59A43800963EB7 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E53E77DD2B59A43800963EB7 /* SwiftUI.framework */; };
E53E77E12B59A43800963EB7 /* DynamicislandWidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = E53E77E02B59A43800963EB7 /* DynamicislandWidgetBundle.swift */; };
E53E77E32B59A43800963EB7 /* DynamicislandWidgetLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = E53E77E22B59A43800963EB7 /* DynamicislandWidgetLiveActivity.swift */; };
E53E77E52B59A43800963EB7 /* DynamicislandWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = E53E77E42B59A43800963EB7 /* DynamicislandWidget.swift */; };
E53E77E72B59A43800963EB7 /* AppIntent.swift in Sources */ = {isa = PBXBuildFile; fileRef = E53E77E62B59A43800963EB7 /* AppIntent.swift */; };
E53E77E92B59A43900963EB7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E53E77E82B59A43900963EB7 /* Assets.xcassets */; };
E53E77ED2B59A43900963EB7 /* DynamicislandWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = E53E77D92B59A43700963EB7 /* DynamicislandWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
E53E77F32B59AA4F00963EB7 /* lockHome.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5797AB32B56D43400BEE375 /* lockHome.swift */; };
E53E77F82B59AE8100963EB7 /* DynamicislandWidgetLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = E53E77E22B59A43800963EB7 /* DynamicislandWidgetLiveActivity.swift */; };
E53E77FA2B5A765500963EB7 /* DynamicislandWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = E53E77E42B59A43800963EB7 /* DynamicislandWidget.swift */; };
E54B0FF82B454C1200CC1925 /* ChocolateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E54B0FF72B454C1200CC1925 /* ChocolateModel.swift */; };
E5797AB42B56D43400BEE375 /* lockHome.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5797AB32B56D43400BEE375 /* lockHome.swift */; };
E5A122CF2B3A990C00C03F38 /* TextModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5A122CE2B3A990C00C03F38 /* TextModel.swift */; };
Expand Down Expand Up @@ -329,8 +329,8 @@
buildActionMask = 2147483647;
files = (
E53E77E12B59A43800963EB7 /* DynamicislandWidgetBundle.swift in Sources */,
E53E77FA2B5A765500963EB7 /* DynamicislandWidget.swift in Sources */,
E53E77E72B59A43800963EB7 /* AppIntent.swift in Sources */,
E53E77E52B59A43800963EB7 /* DynamicislandWidget.swift in Sources */,
E53E77E32B59A43800963EB7 /* DynamicislandWidgetLiveActivity.swift in Sources */,
E53E77F32B59AA4F00963EB7 /* lockHome.swift in Sources */,
);
Expand Down
5 changes: 3 additions & 2 deletions Sweety/Sweety/Home/lockHome.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Combine

struct LockHome: View {
@Binding var homeViewActive: Bool
@State private var remainingTime: TimeInterval = 1 * 1 * 60 //24*60*60으로 하면 24시간
@State private var remainingTime: TimeInterval = 1 * 1 * 10 //24*60*60으로 하면 24시간
@State private var timerStarted = false
let timerInterval: TimeInterval = 1.0
var activity: Activity<DynamicislandWidgetAttributes>?
Expand Down Expand Up @@ -95,7 +95,8 @@ struct LockHome: View {
func Notify(){

let content = UNMutableNotificationContent()
content.title = "시간끝"
content.title = "새로운 초콜릿이 도착했어요!"
//Text("힘들때 Sweety를 초콜릿 처럼 꺼내먹어요")

let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 1, repeats: false)

Expand Down
2 changes: 1 addition & 1 deletion Sweety/Sweety/List/ListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct ListView: View {
List{
ForEach(listModel.dataArray, id: \.self) { item in
Text(item)
.font(Font.custom("나눔손글씨 꽃내음", size: 32))
.font(Font.custom("나눔손글씨 꽃내음", size: 25))
.frame(minWidth: 0, maxWidth: .infinity, alignment: .center)
.background(
Image("paper")
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.
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,13 +1 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"}]}
22 changes: 17 additions & 5 deletions Sweety/Sweety/Source/TextModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,23 @@ import SwiftUI

struct TextModel {

static var texts = ["Apple",
"Banana",
"Orange",
"Grapes",
"Watermelon"]
static var texts = ["일 더하기 일은 매우 힘듦",
"돈이 전부는 아니지만 그만한게 없다",
"즐길수 없으면 피해라!",
"고생끝에 골병난다",
"Watermelon",
"가는 말이 고우면 얕본다!",
"날씨도 표정이 매일 다른데 어떻게 항상 맑은 기분이겠어",
"Chick Chick Pork Pork - 세상에서 제일 행복한 기차 -",
"행복을 돈으로 살 수 없다면 혹시 돈이 모자란 건 아닌지 확인해보자",
"세상에서 가장 도움이 안 되는 이론은? 제가 알기론…",
"멀리 보면 가까이 있는 걸 못 본다",
"나한테 니가 해준게 뭔데 -수수료-",
"고민하게 돼 우리 둘 사이 - 축의금-",
"윈스터 처칠 - 태도는 아주 사소한 것이지만, 커다란 차이를 만든다",
"인생은 롤러코스터와 같아 둘다 오르막과 내리막이 있으니깐 하지만 두려움에 떨거나 즐기는 것은 너의 선택이야",
"조지 버나드 쇼 - 우물쭈물하다가 내 이럴 줄 알았다."]

}


0 comments on commit 92d30de

Please sign in to comment.