Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions smartClass.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand All @@ -18,6 +23,11 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
A534D8932A28EE0600C9E53C /* Profile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Profile.swift; sourceTree = "<group>"; };
A534D8952A28EE3900C9E53C /* SettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingViewController.swift; sourceTree = "<group>"; };
A534D8972A28EE5200C9E53C /* SettingTextFieldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingTextFieldView.swift; sourceTree = "<group>"; };
A534D8992A28EE6800C9E53C /* EntryButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryButtonView.swift; sourceTree = "<group>"; };
A534D89B2A28EE8000C9E53C /* LessonsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LessonsView.swift; sourceTree = "<group>"; };
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 = "<group>"; };
A8700DF42A1DDAD500D60253 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -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 */,
);
Expand Down Expand Up @@ -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;
};
Expand Down
33 changes: 33 additions & 0 deletions smartClass/EntryButtonView.swift
Original file line number Diff line number Diff line change
@@ -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()
}
}
}
53 changes: 53 additions & 0 deletions smartClass/LessonsView.swift
Original file line number Diff line number Diff line change
@@ -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()
}
}
73 changes: 73 additions & 0 deletions smartClass/Profile.swift
Original file line number Diff line number Diff line change
@@ -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()
}
}
66 changes: 66 additions & 0 deletions smartClass/SettingTextFieldView.swift
Original file line number Diff line number Diff line change
@@ -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()
}
}
42 changes: 42 additions & 0 deletions smartClass/SettingViewController.swift
Original file line number Diff line number Diff line change
@@ -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()
}
}
}