diff --git a/smartClass.xcodeproj/project.pbxproj b/smartClass.xcodeproj/project.pbxproj index 16ead9d..2887dea 100644 --- a/smartClass.xcodeproj/project.pbxproj +++ b/smartClass.xcodeproj/project.pbxproj @@ -7,6 +7,11 @@ objects = { /* Begin PBXBuildFile section */ + A534D8942A28EE0600C9E53C /* Profile.swift in Sources */ = {isa = PBXBuildFile; fileRef = A534D8932A28EE0600C9E53C /* Profile.swift */; }; + A534D8962A28EE3900C9E53C /* SettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A534D8952A28EE3900C9E53C /* SettingViewController.swift */; }; + A534D8982A28EE5200C9E53C /* SettingTextFieldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A534D8972A28EE5200C9E53C /* SettingTextFieldView.swift */; }; + A534D89A2A28EE6800C9E53C /* EntryButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A534D8992A28EE6800C9E53C /* EntryButtonView.swift */; }; + A534D89C2A28EE8000C9E53C /* LessonsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A534D89B2A28EE8000C9E53C /* LessonsView.swift */; }; A8700DF32A1DDAD500D60253 /* smartClassApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8700DF22A1DDAD500D60253 /* smartClassApp.swift */; }; A8700DF52A1DDAD500D60253 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8700DF42A1DDAD500D60253 /* ContentView.swift */; }; A8700DF72A1DDAD600D60253 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A8700DF62A1DDAD600D60253 /* Assets.xcassets */; }; @@ -18,6 +23,11 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + A534D8932A28EE0600C9E53C /* Profile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Profile.swift; sourceTree = ""; }; + A534D8952A28EE3900C9E53C /* SettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingViewController.swift; sourceTree = ""; }; + A534D8972A28EE5200C9E53C /* SettingTextFieldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingTextFieldView.swift; sourceTree = ""; }; + A534D8992A28EE6800C9E53C /* EntryButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryButtonView.swift; sourceTree = ""; }; + A534D89B2A28EE8000C9E53C /* LessonsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LessonsView.swift; sourceTree = ""; }; A8700DEF2A1DDAD500D60253 /* smartClass.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = smartClass.app; sourceTree = BUILT_PRODUCTS_DIR; }; A8700DF22A1DDAD500D60253 /* smartClassApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = smartClassApp.swift; sourceTree = ""; }; A8700DF42A1DDAD500D60253 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; @@ -66,6 +76,11 @@ A8700E002A1DDB6B00D60253 /* Fonts */, A8700DF22A1DDAD500D60253 /* smartClassApp.swift */, A8700DF42A1DDAD500D60253 /* ContentView.swift */, + A534D8932A28EE0600C9E53C /* Profile.swift */, + A534D8952A28EE3900C9E53C /* SettingViewController.swift */, + A534D8972A28EE5200C9E53C /* SettingTextFieldView.swift */, + A534D8992A28EE6800C9E53C /* EntryButtonView.swift */, + A534D89B2A28EE8000C9E53C /* LessonsView.swift */, A8700DF62A1DDAD600D60253 /* Assets.xcassets */, A8700DF82A1DDAD600D60253 /* Preview Content */, ); @@ -177,10 +192,15 @@ buildActionMask = 2147483647; files = ( A8700DF52A1DDAD500D60253 /* ContentView.swift in Sources */, + A534D8942A28EE0600C9E53C /* Profile.swift in Sources */, + A534D89C2A28EE8000C9E53C /* LessonsView.swift in Sources */, A8700E082A1DDC6100D60253 /* CustomFont.swift in Sources */, + A534D89A2A28EE6800C9E53C /* EntryButtonView.swift in Sources */, A8700E052A1DDC2A00D60253 /* FontManager.swift in Sources */, A8700DF32A1DDAD500D60253 /* smartClassApp.swift in Sources */, + A534D8962A28EE3900C9E53C /* SettingViewController.swift in Sources */, A8700E0B2A1DDCAD00D60253 /* View.ext.swift in Sources */, + A534D8982A28EE5200C9E53C /* SettingTextFieldView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/smartClass/EntryButtonView.swift b/smartClass/EntryButtonView.swift new file mode 100644 index 0000000..4f9f874 --- /dev/null +++ b/smartClass/EntryButtonView.swift @@ -0,0 +1,33 @@ +// +// EntryButtonView.swift +// smartClass +// +// Created by Демьян Горчаков on 01.06.2023. +// + +import SwiftUI + +struct EntryButtonView: View { + var body: some View { + Button { + // <#code#> + } label: { + ZStack{ + Rectangle() + .frame(width: UIScreen.main.bounds.width / 1.1, height: 60) + .foregroundColor(.blue) + .cornerRadius(10) + Text("Сохранить") + .foregroundColor(.white) + .font(.system(size: 23)) + } + } + } + + + struct EntryButtonView_Previews: PreviewProvider { + static var previews: some View { + EntryButtonView() + } + } +} diff --git a/smartClass/LessonsView.swift b/smartClass/LessonsView.swift new file mode 100644 index 0000000..d3d4502 --- /dev/null +++ b/smartClass/LessonsView.swift @@ -0,0 +1,53 @@ +// +// LessonsView.swift +// smartClass +// +// Created by Демьян Горчаков on 01.06.2023. +// + +import SwiftUI + +struct LessonsView: View { + + var body: some View { + VStack { + VStack(alignment: .leading) { + Text("Основы программирования") + .font(.system(size: 15)) + .fontWeight(.bold) + HStack { + Circle() + .frame(width: 20, height: 20) + .foregroundColor(.red) + Text("Зачет") + ZStack { + Rectangle() + .frame(width: 100, height: 30) + .foregroundColor(.blue) + .cornerRadius(20) + Text("30 часов") + .foregroundColor(.white) + } + } + .padding(.horizontal) + HStack { + Text("Преподаватель: ") + .fontWeight(.bold) + .font(.system(size: 15)) + Text("Александр Викторович") + .font(.system(size: 15)) + } + } + .padding() + .frame(maxWidth: .infinity) + .background(Color(.systemGray6)) + .cornerRadius(10) + } + } +} + +struct LessonsView_Previews: PreviewProvider { + static var previews: some View { + LessonsView() + } +} diff --git a/smartClass/Profile.swift b/smartClass/Profile.swift new file mode 100644 index 0000000..14d3ec4 --- /dev/null +++ b/smartClass/Profile.swift @@ -0,0 +1,73 @@ +// +// Profile.swift +// smartClass +// +// Created by Демьян Горчаков on 01.06.2023. +// + +import SwiftUI + +struct Profile: View { + + var body: some View { + NavigationView { + VStack { + VStack { + HStack { + Text("1 курс") + .font(.system(size: 20)) + .opacity(0.5) + Spacer() + NavigationLink(destination: SettingViewController()) { + Image(systemName: "gear") + .resizable() + .scaledToFit() + .frame(width: 30) + .foregroundColor(.blue) + } + } + } + HStack { + Text("Имя Фамиля") + .font(.system(size: 30)) + .fontWeight(.bold) + Spacer() + } + ScrollView { + HStack { + Text("Специальность") + .fontWeight(.bold) + ZStack { + Rectangle() + .foregroundColor(.blue) + .cornerRadius(20) + .frame(width: 100, height: 30) + Text("ИВТ") + .foregroundColor(.white) + .font(.system(size: 20)) + } + Spacer() + } + HStack { + Text("Предметы в этом семестре") + .fontWeight(.bold) + Spacer() + } + LessonsView() + LessonsView() + LessonsView() + } + .padding(.top, 20) + } + .navigationTitle("") + .navigationBarHidden(true) + } + .padding(.horizontal) + } +} + +struct Profile_Previews: PreviewProvider { + static var previews: some View { + Profile() + } +} diff --git a/smartClass/SettingTextFieldView.swift b/smartClass/SettingTextFieldView.swift new file mode 100644 index 0000000..965ec0c --- /dev/null +++ b/smartClass/SettingTextFieldView.swift @@ -0,0 +1,66 @@ +// +// SettingTextFieldView.swift +// smartClass +// +// Created by Демьян Горчаков on 01.06.2023. +// + +import SwiftUI + +struct SettingTextFieldView: View { + @State var name = "" + @State var surname = "" + @State var nameSurname = "" + + var body: some View { + VStack { + HStack { + Text("Личные данные") + .foregroundColor(.gray) + Spacer() + } + .padding(.horizontal) + .padding(.top) + VStack { + TextField("Имя", text: $name) + .padding() + .font(.system(size: 30)) + .frame(height: 60) + .background(.white) + .cornerRadius(10) + TextField("Фамилия", text: $surname) + .padding() + .font(.system(size: 30)) + .frame(height: 60) + .background(.white) + .cornerRadius(10) + TextField("Отчество", text: $nameSurname) + .padding() + .font(.system(size: 30)) + .frame(height: 60) + .background(.white) + .cornerRadius(10) + HStack { + Text("Дата рождения") + .fontWeight(.bold) + Spacer() + Text("25.03.2021") + .frame(width: 120, height: 30) + .background(.white) + .cornerRadius(10) + } + .padding() + } + .padding() + .background(Color(.systemGray6)) + .cornerRadius(20) + .padding(.horizontal) + } + } +} + +struct SettingTextFieldView_Previews: PreviewProvider { + static var previews: some View { + SettingTextFieldView() + } +} diff --git a/smartClass/SettingViewController.swift b/smartClass/SettingViewController.swift new file mode 100644 index 0000000..a3f7a3b --- /dev/null +++ b/smartClass/SettingViewController.swift @@ -0,0 +1,42 @@ +// +// SettingViewController.swift +// smartClass +// +// Created by Демьян Горчаков on 01.06.2023. +// + +import SwiftUI + +struct SettingViewController: View { + + var body: some View { + VStack { + HStack { + Text("Настройки") + .font(.system(size: 30)) + .fontWeight(.heavy) + + Spacer() + } + .padding(.horizontal) + SettingTextFieldView() + Spacer() + VStack { + EntryButtonView() + Button { + // some code + } label: { + Text("Выйти") + .foregroundColor(.red) + } + } + + } + } + + struct SettingViewController_Previews: PreviewProvider { + static var previews: some View { + SettingViewController() + } + } +}