Added Onboarding View with Onboarding Button and needed localizations

This commit is contained in:
Karol Zientek 2021-02-13 00:37:02 +01:00
parent 2e4d698306
commit 8761a4366f
10 changed files with 126 additions and 8 deletions

View file

@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
96A2D96325D6FEA6001CB109 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 96A2D96525D6FEA6001CB109 /* Localizable.strings */; };
96A2D97B25D7003F001CB109 /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A2D97A25D7003F001CB109 /* OnboardingView.swift */; };
96A2D98825D73DCF001CB109 /* OnboardingButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A2D98725D73DCF001CB109 /* OnboardingButtonView.swift */; };
F4C6D9082544E17400F8903A /* wulkanowyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C6D9072544E17400F8903A /* wulkanowyApp.swift */; };
F4C6D90C2544E17500F8903A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4C6D90B2544E17500F8903A /* Assets.xcassets */; };
F4C6D90F2544E17500F8903A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4C6D90E2544E17500F8903A /* Preview Assets.xcassets */; };
@ -37,6 +38,7 @@
96A2D96425D6FEA6001CB109 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
96A2D96925D6FEBB001CB109 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = "<group>"; };
96A2D97A25D7003F001CB109 /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingView.swift; sourceTree = "<group>"; };
96A2D98725D73DCF001CB109 /* OnboardingButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingButtonView.swift; sourceTree = "<group>"; };
F4C6D9042544E17400F8903A /* wulkanowy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = wulkanowy.app; sourceTree = BUILT_PRODUCTS_DIR; };
F4C6D9072544E17400F8903A /* wulkanowyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = wulkanowyApp.swift; sourceTree = "<group>"; };
F4C6D90B2544E17500F8903A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@ -103,6 +105,7 @@
isa = PBXGroup;
children = (
96A2D97A25D7003F001CB109 /* OnboardingView.swift */,
96A2D98725D73DCF001CB109 /* OnboardingButtonView.swift */,
);
path = Onboarding;
sourceTree = "<group>";
@ -299,6 +302,7 @@
files = (
F4C6D9082544E17400F8903A /* wulkanowyApp.swift in Sources */,
96A2D97B25D7003F001CB109 /* OnboardingView.swift in Sources */,
96A2D98825D73DCF001CB109 /* OnboardingButtonView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View file

@ -1,9 +1,4 @@
{
"images" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1

View file

@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x09",
"green" : "0x02",
"red" : "0xFF"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "wulkanowy-1.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="1024px" height="1024px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Shape</title>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="wulkanowy" fill="#000000" fill-rule="nonzero">
<path d="M295.17362,965.05417 C296.24282,968.52944 295.70822,972.27203 293.83692,975.34631 L268.03972,1017.1831 C265.50012,1021.3267 260.82192,1024 255.74272,1024 L14.345318,1024 C3.1176178,1024 -3.6991822,1012.2376 2.3157178,1003.4158 L157.76692,774.44928 C158.70252,773.11265 159.23732,771.64234 159.63822,770.17205 L230.88102,465.95272 C231.68312,462.34379 234.08912,459.26952 237.56432,457.39823 L334.06972,404.46727 C337.54502,402.59597 339.95092,399.5217 340.75292,395.77911 L353.71832,339.23923 C356.39162,327.47681 373.23342,324.93718 379.91642,335.22932 L384.59472,342.71451 C386.59962,345.92244 387.13432,349.93236 385.79782,353.54129 L297.84672,607.77024 C297.17842,609.77521 296.91122,611.91384 297.31212,614.05247 L319.23302,735.68673 C319.63402,738.09268 319.36642,740.63229 318.29732,742.90458 L266.03482,860.26158 C264.83182,863.06854 264.56442,866.14281 265.50012,868.94975 L295.17362,965.05417 Z M1009.7413,1024 L843.46322,1024 C838.65152,1024 834.24042,1021.5941 831.56732,1017.8515 L719.69042,860.52891 C719.02212,859.45961 718.35382,858.3903 717.95292,857.18731 L662.48222,695.18653 C661.41302,691.9786 658.87342,689.17164 655.66532,687.56767 L519.86272,618.99802 C516.12012,617.12675 513.44682,613.65147 512.64482,609.77521 L492.59532,510.32918 C492.32792,508.72522 491.65962,507.12125 490.59032,505.65094 L444.47622,437.88328 C441.93662,434.14069 441.53572,429.59611 443.40692,425.58618 L471.47632,365.57105 C473.61502,361.02648 478.29332,357.95219 483.63972,357.68486 L535.76872,354.61059 C538.84292,354.47689 541.64992,353.40763 543.92232,351.53632 L582.28382,321.72925 C589.50162,316.11537 600.46222,318.52131 604.33842,326.40749 L736.53212,595.3395 C737.06672,596.54247 737.46782,597.74545 737.73502,598.94844 L754.04222,707.08262 C754.44312,709.62225 755.51232,711.89452 757.25012,713.76582 L1020.5682,1001.9454 C1028.3207,1010.4999 1021.7712,1024 1009.7413,1024 L1009.7413,1024 Z M363.20822,182.58501 C363.20822,151.97594 382.58972,125.64413 410.39192,113.34703 C408.38692,110.00543 407.18402,106.39651 407.18402,102.52025 C407.18402,87.683545 424.29302,75.653785 445.27822,75.653785 L446.74862,75.653785 C455.43662,61.218065 472.01102,51.460605 490.99122,51.460605 C492.32792,51.460605 493.66452,51.460605 495.00122,51.594305 C496.73892,51.727995 498.47652,50.925975 499.41212,49.589335 C513.44682,28.203095 549.00152,12.965395 590.57112,12.965395 C605.94232,12.965395 620.51172,15.104025 633.47712,18.712955 C636.55152,13.633715 643.36822,10.158455 651.25442,10.158455 C660.21002,10.158455 667.82882,14.703035 670.10102,20.985235 C681.06162,8.287145 699.64082,-4.99999999e-06 720.75972,-4.99999999e-06 C754.44312,-4.99999999e-06 781.71052,21.252565 781.71052,47.450715 C781.71052,50.658645 781.30952,53.732915 780.50752,56.807185 C779.97292,58.945825 781.17582,61.084435 783.44822,61.886425 C804.96812,69.772605 819.53752,84.742975 819.53752,101.85196 C819.53752,121.36691 800.69092,138.07492 774.09172,144.62445 C771.95302,145.15911 770.61642,147.0304 770.61642,149.03537 L770.61642,149.43635 C770.61642,164.54039 755.64602,176.97115 736.39842,178.30779 C736.53172,178.97612 736.53172,179.64442 736.53172,180.44641 C736.53172,209.4515 681.32862,232.84271 613.29352,232.84271 C598.59062,232.84271 584.55582,231.77339 571.59042,229.76844 L571.59042,230.43676 C571.59042,242.46651 556.08532,252.22399 537.10502,252.22399 C536.03582,252.22399 535.10012,252.22399 534.16452,252.0903 C535.50122,255.0309 536.16952,258.10517 536.16952,261.31311 C536.16952,280.02607 512.51092,295.1301 483.23842,295.1301 C480.03052,295.1301 476.95632,294.9964 473.88212,294.59544 C471.47602,294.32813 469.20382,295.79843 468.66902,298.07073 C466.12942,307.4272 457.97602,314.24406 448.21862,314.24406 C436.45612,314.24406 427.09962,304.21926 427.09962,291.92217 C427.09962,286.17462 429.10462,280.96172 432.44622,277.08546 C433.64922,275.74883 434.05012,273.87753 433.24812,272.27355 C431.37682,268.79829 430.57482,265.18936 430.57482,261.31311 C430.57482,259.17449 428.83722,257.43685 426.69852,256.90221 C390.47572,248.88236 363.20822,218.67429 363.20822,182.58501 L363.20822,182.58501 Z M670.10102,908.64795 C670.63582,910.25193 670.76932,911.85591 670.76932,913.59353 L663.01682,1011.5693 C662.48222,1018.5198 656.33362,1024 648.84852,1024 L398.62952,1024 C393.28292,1024 388.33742,1020.9257 385.93132,1016.5148 L344.62922,939.79168 C344.36192,939.39068 344.22822,938.98969 344.09452,938.5887 L305.19832,844.35557 C303.72812,841.01397 303.99532,837.13772 305.59942,833.92976 L370.15902,707.61727 C371.76302,704.543 372.03022,700.93407 370.82732,697.72613 L339.28262,610.30987 C338.21332,607.23559 338.34702,603.76032 339.68372,600.81972 L392.34732,488.6756 C397.69372,477.44782 415.20382,478.38348 418.94642,490.14591 L435.38712,541.20556 L485.51112,675.40424 C486.84782,679.14684 490.05572,682.08744 494.06562,683.42409 L600.99682,719.91436 C605.14032,721.38468 608.34842,724.45894 609.68492,728.3352 L670.10102,908.64795 Z" id="Shape"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -7,3 +7,7 @@
*/
"title" = "Wulkanowy";
"onboarding.description.title" = "Keep track of your educational progress with Wulkanowy app!";
"onboarding.description.content" = "Wulkanowy allows you to view your grades, attendance, messages from teachers and many more!";
"onboarding.start" = "Start!";

View file

@ -7,3 +7,7 @@
*/
"title" = "Wulkanowy";
"onboarding.description.title" = "Śledź swoje postępy w nauce za pomocą Wulkanowego!";
"onboarding.description.content" = "Wulkanowy pozwala Tobie na sprawdzenie swoich ocen, frewkwencji, wiadomości od nauczycieli i wiele więcej!";
"onboarding.start" = "Start!";

View file

@ -0,0 +1,31 @@
//
// OnboardingButtonView.swift
// wulkanowy
//
// Created by Karol Zientek on 12/02/2021.
//
import SwiftUI
struct OnboardingButtonView: View {
var body: some View {
Button(action: {
print("Exit the onboarding")
}, label: {
Text("onboarding.start")
})
.padding(10)
.frame(minWidth: 0, maxWidth: .infinity)
.background(Color("OnboardingColor"))
.foregroundColor(.white)
.font(.title)
.cornerRadius(20)
}
}
struct OnboardingButtonView_Previews: PreviewProvider {
static var previews: some View {
OnboardingButtonView()
.previewLayout(.sizeThatFits)
}
}

View file

@ -8,13 +8,42 @@
import SwiftUI
struct OnboardingView: View {
@State private var isAnimating: Bool = false
var body: some View {
VStack(spacing: 20) {
Spacer()
Image("wulkanowy-svg")
.resizable()
.frame(width: 200, height: 200, alignment: .top)
.foregroundColor(Color("OnboardingColor"))
.scaleEffect(isAnimating ? 1.0 : 0.6)
VStack(spacing: 20) {
Text("onboarding.description.title")
.font(.headline)
.multilineTextAlignment(.center)
Text("onboarding.description.content")
.font(.subheadline)
.multilineTextAlignment(.center)
}
.padding(.horizontal, 20)
Spacer()
OnboardingButtonView()
.padding()
}
.onAppear {
withAnimation(.easeOut(duration: 0.5)) {
isAnimating = true
}
}
}
}
struct OnboardingView_Previews: PreviewProvider {
struct WulkanowyCardView_Previews: PreviewProvider {
static var previews: some View {
OnboardingView()
Group {
OnboardingView().previewLayout(.fixed(width: 320, height: 640))
}
}
}