Skip to content

Commit

Permalink
Merge pull request #56 from shilokuma-inc/feat/timeLimit
Browse files Browse the repository at this point in the history
【FEAT】制限時間表示を追加
  • Loading branch information
mrs1669 committed May 21, 2024
2 parents 828f869 + 593fc39 commit 9b1ad2f
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
4 changes: 4 additions & 0 deletions PrimePickApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
4F0C82842BC8247500E1480E /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F0C82832BC8247500E1480E /* MainView.swift */; };
4F0C82862BC8247600E1480E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4F0C82852BC8247600E1480E /* Assets.xcassets */; };
4F0C828A2BC8247600E1480E /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4F0C82892BC8247600E1480E /* Preview Assets.xcassets */; };
4F2239222BFC9DEB004C71A6 /* QuizTimeLimitVIew.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F2239212BFC9DEB004C71A6 /* QuizTimeLimitVIew.swift */; };
4F42C7A42BF76E7700F92FBB /* QuizNumberView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F42C7A32BF76E7700F92FBB /* QuizNumberView.swift */; };
4F42C7A62BF7756200F92FBB /* ColorAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4F42C7A52BF7756200F92FBB /* ColorAssets.xcassets */; };
4F8BE16C2BF4FFB000D7CF0E /* PrimeData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F8BE16B2BF4FFB000D7CF0E /* PrimeData.swift */; };
Expand All @@ -28,6 +29,7 @@
4F0C82852BC8247600E1480E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4F0C82872BC8247600E1480E /* PrimePickApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PrimePickApp.entitlements; sourceTree = "<group>"; };
4F0C82892BC8247600E1480E /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
4F2239212BFC9DEB004C71A6 /* QuizTimeLimitVIew.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuizTimeLimitVIew.swift; sourceTree = "<group>"; };
4F42C7A32BF76E7700F92FBB /* QuizNumberView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuizNumberView.swift; sourceTree = "<group>"; };
4F42C7A52BF7756200F92FBB /* ColorAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ColorAssets.xcassets; sourceTree = "<group>"; };
4F8BE16B2BF4FFB000D7CF0E /* PrimeData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrimeData.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -69,6 +71,7 @@
4F0C82812BC8247500E1480E /* PrimePickApp.swift */,
4F0C82832BC8247500E1480E /* MainView.swift */,
4F8BE16D2BF504BB00D7CF0E /* QuizView.swift */,
4F2239212BFC9DEB004C71A6 /* QuizTimeLimitVIew.swift */,
4F42C7A32BF76E7700F92FBB /* QuizNumberView.swift */,
4F8BE1682BF4FB8E00D7CF0E /* QuizData */,
4F0C82852BC8247600E1480E /* Assets.xcassets */,
Expand Down Expand Up @@ -172,6 +175,7 @@
4F02A57D2BF62F61003DF310 /* PrimeQuizEntity.swift in Sources */,
4F0C82842BC8247500E1480E /* MainView.swift in Sources */,
4F8BE16E2BF504BB00D7CF0E /* QuizView.swift in Sources */,
4F2239222BFC9DEB004C71A6 /* QuizTimeLimitVIew.swift in Sources */,
4F0C82822BC8247500E1480E /* PrimePickApp.swift in Sources */,
4F02A57F2BF63A43003DF310 /* QuizDataManager.swift in Sources */,
4F8BE16C2BF4FFB000D7CF0E /* PrimeData.swift in Sources */,
Expand Down
44 changes: 44 additions & 0 deletions PrimePickApp/QuizTimeLimitVIew.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// QuizTimeLimitVIew.swift
// PrimePickApp
//
// Created by 村石 拓海 on 2024/05/21.
//

import SwiftUI

struct QuizTimeLimitVIew: View {
@State private var progress: Double = 0.01

var body: some View {
ZStack {
Color.appGreen
.opacity(0.5)
.edgesIgnoringSafeArea(.all)

ProgressView(value: progress)
.progressViewStyle(LinearProgressViewStyle(tint: .gray))
.scaleEffect(x: 1, y: 4, anchor: .center)
.padding(.horizontal, 20)

ZStack {
Text("No Timelimit!")
.font(.largeTitle)
.fontWeight(.heavy)
.foregroundColor(.black)
.offset(x: 2, y: 2)

Text("No Timelimit!")
.font(.largeTitle)
.fontWeight(.heavy)
.foregroundColor(.white)
}
.padding()

}
}
}

#Preview {
QuizTimeLimitVIew()
}
5 changes: 4 additions & 1 deletion PrimePickApp/QuizView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ struct QuizView: View {
}

var body: some View {
VStack {
VStack(spacing: .zero) {
QuizNumberView(
quizNumber: $quizNumber,
quizData: quizData
)
.frame(height: UIScreen.main.bounds.height / 3)

QuizTimeLimitVIew()
.frame(height: UIScreen.main.bounds.height / 12)

HStack {
if quizNumber < 9 {
Expand Down

0 comments on commit 9b1ad2f

Please sign in to comment.