Initial Commit
This commit is contained in:
commit
d3f448e288
7
Schedule ICTIS.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
Schedule ICTIS.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>SchemeUserState</key>
|
||||||
|
<dict>
|
||||||
|
<key>Schedule ICTIS.xcscheme_^#shared#^_</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"platform" : "ios",
|
||||||
|
"size" : "1024x1024"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
6
Schedule ICTIS/Assets.xcassets/Contents.json
Normal file
6
Schedule ICTIS/Assets.xcassets/Contents.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xA4",
|
||||||
|
"green" : "0x60",
|
||||||
|
"red" : "0x28"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xA4",
|
||||||
|
"green" : "0x60",
|
||||||
|
"red" : "0x28"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
32
Schedule ICTIS/ContentView.swift
Normal file
32
Schedule ICTIS/ContentView.swift
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// ContentView.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct ContentView: View {
|
||||||
|
@State private var isActiveTabBar: TabModel = .schedule
|
||||||
|
@State private var isTabBarHidden: Bool = false
|
||||||
|
var body: some View {
|
||||||
|
VStack {
|
||||||
|
TabView(selection: $isActiveTabBar) {
|
||||||
|
ScheduleView()
|
||||||
|
.tag(TabModel.schedule)
|
||||||
|
Text("Tasks")
|
||||||
|
.tag(TabModel.tasks)
|
||||||
|
Text("Settings")
|
||||||
|
.tag(TabModel.settings)
|
||||||
|
}
|
||||||
|
CustomTabBarView(isActiveTabBar: $isActiveTabBar)
|
||||||
|
.padding(.bottom, 10)
|
||||||
|
}
|
||||||
|
.background(.secondary.opacity(0.15))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#Preview {
|
||||||
|
ContentView()
|
||||||
|
}
|
54
Schedule ICTIS/CustomTabBarView.swift
Normal file
54
Schedule ICTIS/CustomTabBarView.swift
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
//
|
||||||
|
// CustomTabBarView.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct CustomTabBarView: View {
|
||||||
|
var isActiveForeground: Color = .white
|
||||||
|
var isActiveBackground: Color = Color("blueColor")
|
||||||
|
@Binding var isActiveTabBar: TabModel
|
||||||
|
// @NameSpace private var animation
|
||||||
|
var body: some View {
|
||||||
|
HStack(spacing: 0) {
|
||||||
|
ForEach(TabModel.allCases, id: \.rawValue) { tab in
|
||||||
|
Button {
|
||||||
|
isActiveTabBar = tab
|
||||||
|
} label: {
|
||||||
|
HStack(spacing: 5) {
|
||||||
|
Image(systemName: tab.rawValue)
|
||||||
|
.font(.title)
|
||||||
|
.frame(width: 80, height: 35)
|
||||||
|
}
|
||||||
|
.foregroundStyle(isActiveTabBar == tab ? isActiveForeground : Color("blueColor"))
|
||||||
|
.padding(.vertical, 7)
|
||||||
|
.padding(.leading, 15)
|
||||||
|
.padding(.trailing, 15)
|
||||||
|
.background {
|
||||||
|
if isActiveTabBar == tab {
|
||||||
|
Capsule()
|
||||||
|
.fill(isActiveBackground)
|
||||||
|
// .matchedGeometryEffect(id: "ACTIVETAB", in: animation)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.buttonStyle(.plain)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.horizontal, 5)
|
||||||
|
.animation(.smooth(duration: 0.3, extraBounce: 0), value: isActiveTabBar)
|
||||||
|
// .background(
|
||||||
|
// background
|
||||||
|
// .shadow(.drop(color: .black.opacity(0.08), radius: 5, x: 5, y: 5))
|
||||||
|
// .shadow(.drop(color: .black.opacity(0.08), radius: 5, x: 5, y: -5)),
|
||||||
|
// in: .capsule
|
||||||
|
// )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#Preview {
|
||||||
|
ContentView()
|
||||||
|
}
|
23
Schedule ICTIS/Model.swift
Normal file
23
Schedule ICTIS/Model.swift
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// ViewModel.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
// MARK: - Welcome
|
||||||
|
struct Schedule: Codable {
|
||||||
|
let table: Table
|
||||||
|
let weeks: [Int]
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - Table
|
||||||
|
struct Table: Codable {
|
||||||
|
let type, name: String
|
||||||
|
let week: Int
|
||||||
|
let group: String
|
||||||
|
let table: [[String]]
|
||||||
|
let link: String
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
23
Schedule ICTIS/ScheduleView.swift
Normal file
23
Schedule ICTIS/ScheduleView.swift
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// ScheduleView.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct ScheduleView: View {
|
||||||
|
@State private var searchText: String = ""
|
||||||
|
var body: some View {
|
||||||
|
VStack {
|
||||||
|
SearchBarView(text: $searchText)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
.background(.secondary.opacity(0.15))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#Preview {
|
||||||
|
ScheduleView()
|
||||||
|
}
|
17
Schedule ICTIS/Schedule_ICTISApp.swift
Normal file
17
Schedule ICTIS/Schedule_ICTISApp.swift
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// Schedule_ICTISApp.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
@main
|
||||||
|
struct Schedule_ICTISApp: App {
|
||||||
|
var body: some Scene {
|
||||||
|
WindowGroup {
|
||||||
|
ContentView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
66
Schedule ICTIS/SearchBarView.swift
Normal file
66
Schedule ICTIS/SearchBarView.swift
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
//
|
||||||
|
// SearchBarView.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct SearchBarView: View {
|
||||||
|
@Binding var text: String
|
||||||
|
@State private var isEditing = false
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
HStack {
|
||||||
|
TextField("Ввести номер группы", text: $text)
|
||||||
|
.padding(7)
|
||||||
|
.padding(.horizontal, 25)
|
||||||
|
.background(.white)
|
||||||
|
.cornerRadius(8)
|
||||||
|
.overlay(
|
||||||
|
HStack {
|
||||||
|
Image(systemName: "magnifyingglass")
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
.frame(minWidth: 0, maxWidth: .infinity, alignment: .leading)
|
||||||
|
.padding(.leading, 8)
|
||||||
|
|
||||||
|
if isEditing {
|
||||||
|
Button(action: {
|
||||||
|
self.text = ""
|
||||||
|
self.isEditing = false
|
||||||
|
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
|
||||||
|
}) {
|
||||||
|
Image(systemName: "multiply.circle.fill")
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
.padding(.trailing, 8)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.onTapGesture {
|
||||||
|
self.isEditing = true
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
|
||||||
|
} label: {
|
||||||
|
ZStack {
|
||||||
|
Rectangle()
|
||||||
|
.frame(width: 35, height: 35)
|
||||||
|
.foregroundStyle(Color("blueColor"))
|
||||||
|
.cornerRadius(10)
|
||||||
|
Image(systemName: "plus")
|
||||||
|
.resizable()
|
||||||
|
.foregroundStyle(.white)
|
||||||
|
.scaledToFit()
|
||||||
|
.frame(width: 16)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.horizontal)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#Preview {
|
||||||
|
ScheduleView()
|
||||||
|
}
|
14
Schedule ICTIS/TabModel.swift
Normal file
14
Schedule ICTIS/TabModel.swift
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
//
|
||||||
|
// Tab.swift
|
||||||
|
// Schedule ICTIS
|
||||||
|
//
|
||||||
|
// Created by G412 on 13.11.2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
enum TabModel: String, CaseIterable {
|
||||||
|
case schedule = "house"
|
||||||
|
case tasks = "books.vertical"
|
||||||
|
case settings = "gear"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user