├── DragDrop
├── Assets.xcassets
│ ├── Contents.json
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
├── DragDropApp.swift
├── ContentView.swift
├── Model
│ └── TasksModel.swift
├── ViewModel
│ └── HomeVM.swift
├── HelperView
│ └── FlipEffect.swift
├── Info.plist
└── Views
│ ├── AddNewCardView.swift
│ ├── TaskView.swift
│ ├── TaskListView.swift
│ └── HomeView.swift
├── DragDrop.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── xcuserdata
│ └── harshitparikh.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── project.pbxproj
├── README.md
└── LICENSE
/DragDrop/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DragDrop/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DragDrop.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DragDrop/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/DragDrop.xcodeproj/xcuserdata/harshitparikh.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/DragDrop/DragDropApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DragDropApp.swift
3 | // DragDrop
4 | //
5 | // Created by Harshit Parikh on 25/04/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | @main
11 | struct DragDropApp: App {
12 | var body: some Scene {
13 | WindowGroup {
14 | ContentView()
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/DragDrop.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DragDropTasks-SwiftUI
2 | This project demonstrates drag and drop functionality using SwiftUI. We have created a task management application.
3 |
4 | ## Minimum Requirement
5 | iOS14
6 |
7 | ## Final Project
8 | 
9 |
--------------------------------------------------------------------------------
/DragDrop/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // DragDrop
4 | //
5 | // Created by Harshit Parikh on 25/04/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ContentView: View {
11 | var body: some View {
12 | HomeView()
13 | }
14 | }
15 |
16 | struct ContentView_Previews: PreviewProvider {
17 | static var previews: some View {
18 | ContentView()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/DragDrop.xcodeproj/xcuserdata/harshitparikh.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DragDrop.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/DragDrop/Model/TasksModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TasksModel.swift
3 | // DragDrop
4 | //
5 | // Created by Harshit Parikh on 25/04/21.
6 | //
7 |
8 | import Foundation
9 |
10 | enum TaskType: Int, Codable {
11 | case upcoming = 0
12 | case inProgress
13 | case completed
14 |
15 | var title: String {
16 | switch self {
17 | case .upcoming:
18 | return "Upcoming"
19 | case .inProgress:
20 | return "In Progress"
21 | case .completed:
22 | return "Completed"
23 | }
24 | }
25 | }
26 |
27 | struct TasksModel {
28 | var upcomingArray: [TaskInfo]
29 | var inProgressArray: [TaskInfo]
30 | var completedArray: [TaskInfo]
31 | }
32 |
33 | struct TaskInfo: Codable {
34 | var id: Int
35 | var title: String
36 | var description: String
37 | var taskStatus: TaskType
38 | }
39 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Harshit Parakh
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/DragDrop/ViewModel/HomeVM.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HomeVM.swift
3 | // DragDrop
4 | //
5 | // Created by Harshit Parikh on 25/04/21.
6 | //
7 |
8 | import Foundation
9 |
10 | class HomeVM: ObservableObject {
11 | // MARK:- Properties
12 | @Published var tasksArray: TasksModel
13 | var taskNumber: Int = 0
14 |
15 | // MARK:- Methods
16 | init() {
17 | self.tasksArray = TasksModel(upcomingArray: [TaskInfo(id: 1, title: "Meeting with Paul", description: "Meeting with Paul from XYZ \nDate: 17th May 2021 \nTime: 10 - 10:30 IST", taskStatus: .upcoming)], inProgressArray: [TaskInfo(id: 2, title: "Create task management app.", description: "Demonstrate Drag and Drop in SwiftUI. \nCreate new task functionality. \nDelete new task functionality. \nBasic animations.", taskStatus: .inProgress)], completedArray: [TaskInfo(id: 3, title: "Learn animations in SwiftUI", description: "Learn animations and transitions for next article in SwiftUI.", taskStatus: .completed)])
18 |
19 | let upcomingCount = self.tasksArray.upcomingArray.count
20 | let inProgressCount = self.tasksArray.inProgressArray.count
21 | let completedCount = self.tasksArray.completedArray.count
22 |
23 | self.taskNumber = upcomingCount + inProgressCount + completedCount
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/DragDrop/HelperView/FlipEffect.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FlipEffect.swift
3 | // DragDrop
4 | //
5 | // Created by Harshit Parikh on 26/04/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct FlipEffect: GeometryEffect {
11 | var animatableData: Double {
12 | get { angle }
13 | set { angle = newValue }
14 | }
15 |
16 | @Binding var flipped: Bool
17 | var angle: Double
18 | let axis: (x: CGFloat, y: CGFloat)
19 |
20 | func effectValue(size: CGSize) -> ProjectionTransform {
21 |
22 | DispatchQueue.main.async {
23 | self.flipped = self.angle >= 90 && self.angle < 270
24 | }
25 |
26 | let tweakedAngle = flipped ? -180 + angle : angle
27 | let a = CGFloat(Angle(degrees: tweakedAngle).radians)
28 |
29 | var transform3d = CATransform3DIdentity;
30 | transform3d.m34 = -1/max(size.width, size.height)
31 |
32 | transform3d = CATransform3DRotate(transform3d, a, axis.x, axis.y, 0)
33 | transform3d = CATransform3DTranslate(transform3d, -size.width/2.0, -size.height/2.0, 0)
34 |
35 | let affineTransform = ProjectionTransform(CGAffineTransform(translationX: size.width/2.0, y: size.height / 2.0))
36 |
37 | return ProjectionTransform(transform3d).concatenating(affineTransform)
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/DragDrop/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIApplicationSceneManifest
24 |
25 | UIApplicationSupportsMultipleScenes
26 |
27 |
28 | UIApplicationSupportsIndirectInputEvents
29 |
30 | UILaunchScreen
31 |
32 | UIRequiredDeviceCapabilities
33 |
34 | armv7
35 |
36 | UISupportedInterfaceOrientations
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/DragDrop/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "1x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "76x76"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "scale" : "2x",
86 | "size" : "83.5x83.5"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "scale" : "1x",
91 | "size" : "1024x1024"
92 | }
93 | ],
94 | "info" : {
95 | "author" : "xcode",
96 | "version" : 1
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/DragDrop/Views/AddNewCardView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AddNewCardView.swift
3 | // DragDrop
4 | //
5 | // Created by Harshit Parikh on 05/05/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct AddNewCardView: View {
11 | @Environment(\.presentationMode) var presentationMode
12 |
13 | @State private var name: String = ""
14 | @State private var description: String = ""
15 |
16 | @ObservedObject var viewModel: HomeVM
17 |
18 | var body: some View {
19 | VStack {
20 | Spacer()
21 |
22 | VStack(alignment: .leading, spacing: 20) {
23 | VStack(alignment: .leading, spacing: 10) {
24 | Text("Task Name")
25 | .font(.headline)
26 |
27 | TextField("", text: $name)
28 | .textFieldStyle(RoundedBorderTextFieldStyle())
29 | .overlay(
30 | RoundedRectangle(cornerRadius: 4)
31 | .stroke(Color.black, lineWidth: 1)
32 | )
33 | .cornerRadius(4)
34 | }
35 |
36 |
37 | VStack(alignment: .leading, spacing: 10) {
38 | Text("Task Description")
39 | .font(.headline)
40 |
41 | TextEditor(text: $description)
42 | .foregroundColor(.primary)
43 | .overlay(
44 | RoundedRectangle(cornerRadius: 4)
45 | .stroke(Color.black, lineWidth: 1)
46 | )
47 | .cornerRadius(4)
48 | }
49 |
50 | Spacer()
51 |
52 | HStack {
53 | Spacer()
54 |
55 | Button(action: {
56 | self.addNewTask()
57 | self.presentationMode.wrappedValue.dismiss()
58 | }) {
59 | Text("Add Task")
60 | }
61 | .padding()
62 | .background(Color.blue)
63 | .foregroundColor(.white)
64 | .clipShape(Capsule())
65 |
66 | Spacer()
67 | }
68 |
69 |
70 | }
71 | .padding()
72 | }
73 | .background(Color.white.opacity(0.5))
74 | }
75 |
76 | func addNewTask() {
77 | self.viewModel.taskNumber += 1
78 | let newTaskNumber = self.viewModel.taskNumber
79 |
80 | let task = TaskInfo(id: newTaskNumber, title: self.name, description: self.description, taskStatus: .upcoming)
81 | self.viewModel.tasksArray.upcomingArray.append(task)
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/DragDrop/Views/TaskView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TaskView.swift
3 | // DragDrop
4 | //
5 | // Created by Harshit Parikh on 26/04/21.
6 | //
7 |
8 | import SwiftUI
9 | import MobileCoreServices
10 |
11 | struct TaskView: View {
12 | // MARK:- Properties
13 | @State private var flipped = false
14 | @State private var animate3d = false
15 | var task: TaskInfo
16 |
17 | var body: some View {
18 | ZStack {
19 | // Front View
20 | frontView
21 | .opacity(flipped ? 0.0 : 1.0)
22 |
23 | // Back View
24 | backView
25 | .opacity(flipped ? 1.0 : 0.0)
26 | }
27 |
28 | }
29 |
30 | var frontView: some View {
31 | HStack {
32 | VStack(alignment: .leading, spacing: 5) {
33 | Text("Task Id: ")
34 | .font(.headline)
35 | Text("T\(task.id)")
36 | .font(.subheadline)
37 |
38 | Text("Name")
39 | .font(.headline)
40 | Text(task.title)
41 | .font(.subheadline)
42 |
43 | Text("Status")
44 | .font(.headline)
45 | Text(task.taskStatus.title)
46 | .font(.subheadline)
47 | }
48 | .padding()
49 |
50 | Spacer()
51 | }
52 | .frame(height: 180)
53 | .background(task.taskStatus == .upcoming ? Color.pink.opacity(0.5) : (task.taskStatus == .inProgress ? Color.blue.opacity(0.5) : Color.green.opacity(0.5)))
54 | .cornerRadius(20)
55 | .onDrag {
56 | let itemProvider = convertModelToData(model: task)!
57 | return itemProvider
58 | }
59 | .modifier(FlipEffect(flipped: $flipped, angle: animate3d ? 180 : 0, axis: (x: 1, y: 0)))
60 | .onTapGesture {
61 | withAnimation(Animation.linear(duration: 0.8)) {
62 | self.animate3d.toggle()
63 | }
64 | }
65 | }
66 |
67 | var backView: some View {
68 | HStack {
69 | VStack(alignment: .leading, spacing: 5) {
70 | Text("Task Description: ")
71 | .font(.headline)
72 | Text("\(task.description)")
73 | .font(.subheadline)
74 |
75 | Spacer()
76 | }
77 | .padding()
78 |
79 | Spacer()
80 | }
81 | .frame(height: 180)
82 | .background(task.taskStatus == .upcoming ? Color.pink.opacity(0.5) : (task.taskStatus == .inProgress ? Color.blue.opacity(0.5) : Color.green.opacity(0.5)))
83 | .cornerRadius(20)
84 | .onDrag {
85 | let itemProvider = convertModelToData(model: task)!
86 | return itemProvider
87 | }
88 | .modifier(FlipEffect(flipped: $flipped, angle: animate3d ? 180 : 0, axis: (x: 1, y: 0)))
89 | .onTapGesture {
90 | withAnimation(Animation.linear(duration: 0.8)) {
91 | self.animate3d.toggle()
92 | }
93 | }
94 | }
95 |
96 | // MARK:- Methods
97 | private func convertModelToData(model: TaskInfo) -> NSItemProvider? {
98 | do {
99 | let dataBlob = try PropertyListEncoder().encode(model)
100 | return NSItemProvider(item: dataBlob as NSData, typeIdentifier: kUTTypeData as String)
101 | } catch let error {
102 | print("Error: \(error.localizedDescription)")
103 | }
104 | return nil
105 | }
106 |
107 | }
108 |
--------------------------------------------------------------------------------
/DragDrop/Views/TaskListView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TaskView.swift
3 | // DragDrop
4 | //
5 | // Created by Harshit Parikh on 25/04/21.
6 | //
7 |
8 | import SwiftUI
9 | import MobileCoreServices
10 |
11 | struct TaskListView: View {
12 | // MARK:- Properties
13 | @Binding var selectedIndex: Int
14 | @Binding var array: [TaskInfo]
15 | var taskType: TaskType
16 | var viewModel: HomeVM
17 |
18 | var body: some View {
19 | ScrollView(.vertical) {
20 | VStack(alignment: .leading) {
21 | if array.count > 0 {
22 | ForEach(0 ..< array.count, id: \.self) { i in
23 | TaskView(task: array[i])
24 | }
25 | } else {
26 | Text("No tasks available")
27 | }
28 | }
29 | .padding()
30 | }
31 | .frame(maxWidth: .infinity, maxHeight: .infinity)
32 | .onDrop(
33 | of: [kUTTypeData as String],
34 | delegate: TaskDropDelegate(selectedIndex: $selectedIndex, array: $array, taskType: taskType, viewModel: viewModel)
35 | )
36 | }
37 | }
38 |
39 | struct TaskDropDelegate: DropDelegate {
40 | // MARK:- Properties
41 | @Binding var selectedIndex: Int
42 | @Binding var array: [TaskInfo]
43 | var taskType: TaskType
44 | var viewModel: HomeVM
45 |
46 | // MARK:- Methods
47 | func performDrop(info: DropInfo) -> Bool {
48 | guard info.hasItemsConforming(to: [kUTTypeData as String]) else {
49 | return false
50 | }
51 | let items = info.itemProviders(for: [kUTTypeData as String])
52 | guard let item = items.first else {
53 | return false
54 | }
55 | item.loadDataRepresentation(forTypeIdentifier: kUTTypeData as String) { (data, error) in
56 | guard error == nil else {
57 | print("Error: ", error.debugDescription)
58 | return
59 | }
60 | guard let responseData = data else {
61 | return
62 | }
63 | do {
64 | var dataBlob = try PropertyListDecoder().decode(TaskInfo.self, from: responseData)
65 | DispatchQueue.main.async {
66 | withAnimation() {
67 | switch dataBlob.taskStatus {
68 | case .upcoming:
69 | guard let index = self.viewModel.tasksArray.upcomingArray.map({ $0.id }).firstIndex(of: dataBlob.id) else {
70 | return
71 | }
72 | self.viewModel.tasksArray.upcomingArray.remove(at: index)
73 | case .inProgress:
74 | guard let index = self.viewModel.tasksArray.inProgressArray.map({ $0.id }).firstIndex(of: dataBlob.id) else {
75 | return
76 | }
77 | self.viewModel.tasksArray.inProgressArray.remove(at: index)
78 | case .completed:
79 | guard let index = self.viewModel.tasksArray.completedArray.map({ $0.id }).firstIndex(of: dataBlob.id) else {
80 | return
81 | }
82 | self.viewModel.tasksArray.completedArray.remove(at: index)
83 | }
84 | self.selectedIndex = taskType.rawValue
85 | dataBlob.taskStatus = TaskType(rawValue: taskType.rawValue) ?? .upcoming
86 | self.array.append(dataBlob)
87 | }
88 | }
89 | } catch let error {
90 | print("Error: \(error.localizedDescription)")
91 | }
92 | }
93 | return true
94 | }
95 |
96 | func dropUpdated(info: DropInfo) -> DropProposal? {
97 | return DropProposal(operation: .move)
98 | }
99 |
100 | func dropEntered(info: DropInfo) {
101 |
102 | }
103 |
104 | func dropExited(info: DropInfo) {
105 |
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/DragDrop/Views/HomeView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HomeView.swift
3 | // DragDrop
4 | //
5 | // Created by Harshit Parikh on 25/04/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct HomeView: View {
11 | // MARK:- Properties
12 | @StateObject var viewModel = HomeVM()
13 | @State private var selectedTab: Int = 0
14 | @State private var taskTypes: [TaskType] = [.upcoming, .inProgress, .completed]
15 | @State private var addNewCard: Bool = false
16 | private var selectedTaskType: TaskType {
17 | return TaskType(rawValue: selectedTab) ?? .upcoming
18 | }
19 |
20 | var body: some View {
21 | NavigationView {
22 | ScrollViewReader { proxy in
23 | VStack {
24 | Picker(selection: $selectedTab, label: Text("Tasks")) {
25 | Text("Upcoming").tag(0)
26 | Text("In Progress").tag(1)
27 | Text("Completed").tag(2)
28 | }
29 | .pickerStyle(SegmentedPickerStyle())
30 | .padding(.horizontal, 10)
31 | .onChange(of: selectedTab) { tag in
32 | withAnimation(.default) {
33 | switch selectedTaskType {
34 | case .upcoming:
35 | proxy.scrollTo(tag, anchor: .leading)
36 | break
37 | case .inProgress:
38 | proxy.scrollTo(tag, anchor: .center)
39 | break
40 | case .completed:
41 | proxy.scrollTo(tag, anchor: .trailing)
42 | break
43 | }
44 | }
45 | }
46 |
47 | ScrollView(.horizontal, showsIndicators: false) {
48 | HStack {
49 | ForEach(0 ..< taskTypes.count) { i in
50 | let type = TaskType(rawValue: i)
51 | VStack(alignment: .leading) {
52 | switch type {
53 | case .upcoming:
54 | TaskListView(selectedIndex: $selectedTab, array: self.$viewModel.tasksArray.upcomingArray, taskType: .upcoming, viewModel: viewModel)
55 | case .inProgress:
56 | TaskListView(selectedIndex: $selectedTab, array: self.$viewModel.tasksArray.inProgressArray, taskType: .inProgress, viewModel: viewModel)
57 | case .completed:
58 | TaskListView(selectedIndex: $selectedTab, array: self.$viewModel.tasksArray.completedArray, taskType: .completed, viewModel: viewModel)
59 | default:
60 | EmptyView()
61 | }
62 | }
63 | .frame(width: 300)
64 | .background(type == .upcoming ? Color.pink.opacity(0.25) : (type == .inProgress ? Color.blue.opacity(0.25) : Color.green.opacity(0.25)))
65 | }
66 | }
67 | .padding(.horizontal, 5)
68 | .padding(.vertical, 10)
69 | }
70 |
71 | Spacer()
72 | }
73 | .sheet(isPresented: $addNewCard) {
74 | AddNewCardView(viewModel: self.viewModel)
75 | }
76 | }
77 | .navigationBarTitle(Text("Task Management"), displayMode: .large)
78 | .navigationBarItems(trailing: Button("Add") {
79 | self.addNewCard.toggle()
80 | })
81 | }
82 | }
83 | }
84 |
85 | struct HomeView_Previews: PreviewProvider {
86 | static var previews: some View {
87 | HomeView()
88 | }
89 | }
90 |
91 | extension Binding {
92 | func onChange(_ handler: @escaping (Value) -> Void) -> Binding {
93 | return Binding(
94 | get: { self.wrappedValue },
95 | set: { selection in
96 | self.wrappedValue = selection
97 | handler(selection)
98 | })
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/DragDrop.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | E186E38D26352BF200CDCFB3 /* DragDropApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = E186E38C26352BF200CDCFB3 /* DragDropApp.swift */; };
11 | E186E38F26352BF200CDCFB3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E186E38E26352BF200CDCFB3 /* ContentView.swift */; };
12 | E186E39126352BF300CDCFB3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E186E39026352BF300CDCFB3 /* Assets.xcassets */; };
13 | E186E39426352BF300CDCFB3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E186E39326352BF300CDCFB3 /* Preview Assets.xcassets */; };
14 | E186E39E26352FBB00CDCFB3 /* TaskListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E186E39D26352FBB00CDCFB3 /* TaskListView.swift */; };
15 | E186E3A22635304800CDCFB3 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E186E3A12635304800CDCFB3 /* HomeView.swift */; };
16 | E186E3A72635310900CDCFB3 /* TasksModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E186E3A62635310900CDCFB3 /* TasksModel.swift */; };
17 | E186E3AC2635317500CDCFB3 /* HomeVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = E186E3AB2635317500CDCFB3 /* HomeVM.swift */; };
18 | E186E3B32636A88D00CDCFB3 /* TaskView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E186E3B22636A88D00CDCFB3 /* TaskView.swift */; };
19 | E186E3B72636A8D000CDCFB3 /* FlipEffect.swift in Sources */ = {isa = PBXBuildFile; fileRef = E186E3B62636A8D000CDCFB3 /* FlipEffect.swift */; };
20 | E1EAAC122641CD6C00C7777F /* AddNewCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1EAAC112641CD6C00C7777F /* AddNewCardView.swift */; };
21 | /* End PBXBuildFile section */
22 |
23 | /* Begin PBXFileReference section */
24 | E186E38926352BF200CDCFB3 /* DragDrop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DragDrop.app; sourceTree = BUILT_PRODUCTS_DIR; };
25 | E186E38C26352BF200CDCFB3 /* DragDropApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DragDropApp.swift; sourceTree = ""; };
26 | E186E38E26352BF200CDCFB3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
27 | E186E39026352BF300CDCFB3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
28 | E186E39326352BF300CDCFB3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
29 | E186E39526352BF300CDCFB3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
30 | E186E39D26352FBB00CDCFB3 /* TaskListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskListView.swift; sourceTree = ""; };
31 | E186E3A12635304800CDCFB3 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; };
32 | E186E3A62635310900CDCFB3 /* TasksModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TasksModel.swift; sourceTree = ""; };
33 | E186E3AB2635317500CDCFB3 /* HomeVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVM.swift; sourceTree = ""; };
34 | E186E3B22636A88D00CDCFB3 /* TaskView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskView.swift; sourceTree = ""; };
35 | E186E3B62636A8D000CDCFB3 /* FlipEffect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlipEffect.swift; sourceTree = ""; };
36 | E1EAAC112641CD6C00C7777F /* AddNewCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddNewCardView.swift; sourceTree = ""; };
37 | /* End PBXFileReference section */
38 |
39 | /* Begin PBXFrameworksBuildPhase section */
40 | E186E38626352BF200CDCFB3 /* Frameworks */ = {
41 | isa = PBXFrameworksBuildPhase;
42 | buildActionMask = 2147483647;
43 | files = (
44 | );
45 | runOnlyForDeploymentPostprocessing = 0;
46 | };
47 | /* End PBXFrameworksBuildPhase section */
48 |
49 | /* Begin PBXGroup section */
50 | E186E38026352BF200CDCFB3 = {
51 | isa = PBXGroup;
52 | children = (
53 | E186E38B26352BF200CDCFB3 /* DragDrop */,
54 | E186E38A26352BF200CDCFB3 /* Products */,
55 | );
56 | sourceTree = "";
57 | };
58 | E186E38A26352BF200CDCFB3 /* Products */ = {
59 | isa = PBXGroup;
60 | children = (
61 | E186E38926352BF200CDCFB3 /* DragDrop.app */,
62 | );
63 | name = Products;
64 | sourceTree = "";
65 | };
66 | E186E38B26352BF200CDCFB3 /* DragDrop */ = {
67 | isa = PBXGroup;
68 | children = (
69 | E186E3B52636A8BE00CDCFB3 /* HelperView */,
70 | E186E3AA2635316600CDCFB3 /* ViewModel */,
71 | E186E3A5263530FC00CDCFB3 /* Model */,
72 | E186E39C26352F9B00CDCFB3 /* Views */,
73 | E186E38C26352BF200CDCFB3 /* DragDropApp.swift */,
74 | E186E38E26352BF200CDCFB3 /* ContentView.swift */,
75 | E186E39026352BF300CDCFB3 /* Assets.xcassets */,
76 | E186E39526352BF300CDCFB3 /* Info.plist */,
77 | E186E39226352BF300CDCFB3 /* Preview Content */,
78 | );
79 | path = DragDrop;
80 | sourceTree = "";
81 | };
82 | E186E39226352BF300CDCFB3 /* Preview Content */ = {
83 | isa = PBXGroup;
84 | children = (
85 | E186E39326352BF300CDCFB3 /* Preview Assets.xcassets */,
86 | );
87 | path = "Preview Content";
88 | sourceTree = "";
89 | };
90 | E186E39C26352F9B00CDCFB3 /* Views */ = {
91 | isa = PBXGroup;
92 | children = (
93 | E186E3A12635304800CDCFB3 /* HomeView.swift */,
94 | E186E39D26352FBB00CDCFB3 /* TaskListView.swift */,
95 | E186E3B22636A88D00CDCFB3 /* TaskView.swift */,
96 | E1EAAC112641CD6C00C7777F /* AddNewCardView.swift */,
97 | );
98 | path = Views;
99 | sourceTree = "";
100 | };
101 | E186E3A5263530FC00CDCFB3 /* Model */ = {
102 | isa = PBXGroup;
103 | children = (
104 | E186E3A62635310900CDCFB3 /* TasksModel.swift */,
105 | );
106 | path = Model;
107 | sourceTree = "";
108 | };
109 | E186E3AA2635316600CDCFB3 /* ViewModel */ = {
110 | isa = PBXGroup;
111 | children = (
112 | E186E3AB2635317500CDCFB3 /* HomeVM.swift */,
113 | );
114 | path = ViewModel;
115 | sourceTree = "";
116 | };
117 | E186E3B52636A8BE00CDCFB3 /* HelperView */ = {
118 | isa = PBXGroup;
119 | children = (
120 | E186E3B62636A8D000CDCFB3 /* FlipEffect.swift */,
121 | );
122 | path = HelperView;
123 | sourceTree = "";
124 | };
125 | /* End PBXGroup section */
126 |
127 | /* Begin PBXNativeTarget section */
128 | E186E38826352BF200CDCFB3 /* DragDrop */ = {
129 | isa = PBXNativeTarget;
130 | buildConfigurationList = E186E39826352BF300CDCFB3 /* Build configuration list for PBXNativeTarget "DragDrop" */;
131 | buildPhases = (
132 | E186E38526352BF200CDCFB3 /* Sources */,
133 | E186E38626352BF200CDCFB3 /* Frameworks */,
134 | E186E38726352BF200CDCFB3 /* Resources */,
135 | );
136 | buildRules = (
137 | );
138 | dependencies = (
139 | );
140 | name = DragDrop;
141 | productName = DragDrop;
142 | productReference = E186E38926352BF200CDCFB3 /* DragDrop.app */;
143 | productType = "com.apple.product-type.application";
144 | };
145 | /* End PBXNativeTarget section */
146 |
147 | /* Begin PBXProject section */
148 | E186E38126352BF200CDCFB3 /* Project object */ = {
149 | isa = PBXProject;
150 | attributes = {
151 | LastSwiftUpdateCheck = 1210;
152 | LastUpgradeCheck = 1210;
153 | TargetAttributes = {
154 | E186E38826352BF200CDCFB3 = {
155 | CreatedOnToolsVersion = 12.1;
156 | };
157 | };
158 | };
159 | buildConfigurationList = E186E38426352BF200CDCFB3 /* Build configuration list for PBXProject "DragDrop" */;
160 | compatibilityVersion = "Xcode 9.3";
161 | developmentRegion = en;
162 | hasScannedForEncodings = 0;
163 | knownRegions = (
164 | en,
165 | Base,
166 | );
167 | mainGroup = E186E38026352BF200CDCFB3;
168 | productRefGroup = E186E38A26352BF200CDCFB3 /* Products */;
169 | projectDirPath = "";
170 | projectRoot = "";
171 | targets = (
172 | E186E38826352BF200CDCFB3 /* DragDrop */,
173 | );
174 | };
175 | /* End PBXProject section */
176 |
177 | /* Begin PBXResourcesBuildPhase section */
178 | E186E38726352BF200CDCFB3 /* Resources */ = {
179 | isa = PBXResourcesBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | E186E39426352BF300CDCFB3 /* Preview Assets.xcassets in Resources */,
183 | E186E39126352BF300CDCFB3 /* Assets.xcassets in Resources */,
184 | );
185 | runOnlyForDeploymentPostprocessing = 0;
186 | };
187 | /* End PBXResourcesBuildPhase section */
188 |
189 | /* Begin PBXSourcesBuildPhase section */
190 | E186E38526352BF200CDCFB3 /* Sources */ = {
191 | isa = PBXSourcesBuildPhase;
192 | buildActionMask = 2147483647;
193 | files = (
194 | E186E39E26352FBB00CDCFB3 /* TaskListView.swift in Sources */,
195 | E186E3B32636A88D00CDCFB3 /* TaskView.swift in Sources */,
196 | E186E3A72635310900CDCFB3 /* TasksModel.swift in Sources */,
197 | E186E3B72636A8D000CDCFB3 /* FlipEffect.swift in Sources */,
198 | E186E3A22635304800CDCFB3 /* HomeView.swift in Sources */,
199 | E186E3AC2635317500CDCFB3 /* HomeVM.swift in Sources */,
200 | E186E38F26352BF200CDCFB3 /* ContentView.swift in Sources */,
201 | E186E38D26352BF200CDCFB3 /* DragDropApp.swift in Sources */,
202 | E1EAAC122641CD6C00C7777F /* AddNewCardView.swift in Sources */,
203 | );
204 | runOnlyForDeploymentPostprocessing = 0;
205 | };
206 | /* End PBXSourcesBuildPhase section */
207 |
208 | /* Begin XCBuildConfiguration section */
209 | E186E39626352BF300CDCFB3 /* Debug */ = {
210 | isa = XCBuildConfiguration;
211 | buildSettings = {
212 | ALWAYS_SEARCH_USER_PATHS = NO;
213 | CLANG_ANALYZER_NONNULL = YES;
214 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
215 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
216 | CLANG_CXX_LIBRARY = "libc++";
217 | CLANG_ENABLE_MODULES = YES;
218 | CLANG_ENABLE_OBJC_ARC = YES;
219 | CLANG_ENABLE_OBJC_WEAK = YES;
220 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
221 | CLANG_WARN_BOOL_CONVERSION = YES;
222 | CLANG_WARN_COMMA = YES;
223 | CLANG_WARN_CONSTANT_CONVERSION = YES;
224 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
225 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
226 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
227 | CLANG_WARN_EMPTY_BODY = YES;
228 | CLANG_WARN_ENUM_CONVERSION = YES;
229 | CLANG_WARN_INFINITE_RECURSION = YES;
230 | CLANG_WARN_INT_CONVERSION = YES;
231 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
232 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
233 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
234 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
235 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
236 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
237 | CLANG_WARN_STRICT_PROTOTYPES = YES;
238 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
239 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
240 | CLANG_WARN_UNREACHABLE_CODE = YES;
241 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
242 | COPY_PHASE_STRIP = NO;
243 | DEBUG_INFORMATION_FORMAT = dwarf;
244 | ENABLE_STRICT_OBJC_MSGSEND = YES;
245 | ENABLE_TESTABILITY = YES;
246 | GCC_C_LANGUAGE_STANDARD = gnu11;
247 | GCC_DYNAMIC_NO_PIC = NO;
248 | GCC_NO_COMMON_BLOCKS = YES;
249 | GCC_OPTIMIZATION_LEVEL = 0;
250 | GCC_PREPROCESSOR_DEFINITIONS = (
251 | "DEBUG=1",
252 | "$(inherited)",
253 | );
254 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
255 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
256 | GCC_WARN_UNDECLARED_SELECTOR = YES;
257 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
258 | GCC_WARN_UNUSED_FUNCTION = YES;
259 | GCC_WARN_UNUSED_VARIABLE = YES;
260 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
261 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
262 | MTL_FAST_MATH = YES;
263 | ONLY_ACTIVE_ARCH = YES;
264 | SDKROOT = iphoneos;
265 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
266 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
267 | };
268 | name = Debug;
269 | };
270 | E186E39726352BF300CDCFB3 /* Release */ = {
271 | isa = XCBuildConfiguration;
272 | buildSettings = {
273 | ALWAYS_SEARCH_USER_PATHS = NO;
274 | CLANG_ANALYZER_NONNULL = YES;
275 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
276 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
277 | CLANG_CXX_LIBRARY = "libc++";
278 | CLANG_ENABLE_MODULES = YES;
279 | CLANG_ENABLE_OBJC_ARC = YES;
280 | CLANG_ENABLE_OBJC_WEAK = YES;
281 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
282 | CLANG_WARN_BOOL_CONVERSION = YES;
283 | CLANG_WARN_COMMA = YES;
284 | CLANG_WARN_CONSTANT_CONVERSION = YES;
285 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
286 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
287 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
288 | CLANG_WARN_EMPTY_BODY = YES;
289 | CLANG_WARN_ENUM_CONVERSION = YES;
290 | CLANG_WARN_INFINITE_RECURSION = YES;
291 | CLANG_WARN_INT_CONVERSION = YES;
292 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
293 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
294 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
295 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
296 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
297 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
298 | CLANG_WARN_STRICT_PROTOTYPES = YES;
299 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
300 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
301 | CLANG_WARN_UNREACHABLE_CODE = YES;
302 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
303 | COPY_PHASE_STRIP = NO;
304 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
305 | ENABLE_NS_ASSERTIONS = NO;
306 | ENABLE_STRICT_OBJC_MSGSEND = YES;
307 | GCC_C_LANGUAGE_STANDARD = gnu11;
308 | GCC_NO_COMMON_BLOCKS = YES;
309 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
310 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
311 | GCC_WARN_UNDECLARED_SELECTOR = YES;
312 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
313 | GCC_WARN_UNUSED_FUNCTION = YES;
314 | GCC_WARN_UNUSED_VARIABLE = YES;
315 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
316 | MTL_ENABLE_DEBUG_INFO = NO;
317 | MTL_FAST_MATH = YES;
318 | SDKROOT = iphoneos;
319 | SWIFT_COMPILATION_MODE = wholemodule;
320 | SWIFT_OPTIMIZATION_LEVEL = "-O";
321 | VALIDATE_PRODUCT = YES;
322 | };
323 | name = Release;
324 | };
325 | E186E39926352BF300CDCFB3 /* Debug */ = {
326 | isa = XCBuildConfiguration;
327 | buildSettings = {
328 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
329 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
330 | CODE_SIGN_STYLE = Automatic;
331 | DEVELOPMENT_ASSET_PATHS = "\"DragDrop/Preview Content\"";
332 | DEVELOPMENT_TEAM = 76J7APB488;
333 | ENABLE_PREVIEWS = YES;
334 | INFOPLIST_FILE = DragDrop/Info.plist;
335 | IPHONEOS_DEPLOYMENT_TARGET = 14.0;
336 | LD_RUNPATH_SEARCH_PATHS = (
337 | "$(inherited)",
338 | "@executable_path/Frameworks",
339 | );
340 | PRODUCT_BUNDLE_IDENTIFIER = com.harshit.DragDrop;
341 | PRODUCT_NAME = "$(TARGET_NAME)";
342 | SWIFT_VERSION = 5.0;
343 | TARGETED_DEVICE_FAMILY = "1,2";
344 | };
345 | name = Debug;
346 | };
347 | E186E39A26352BF300CDCFB3 /* Release */ = {
348 | isa = XCBuildConfiguration;
349 | buildSettings = {
350 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
351 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
352 | CODE_SIGN_STYLE = Automatic;
353 | DEVELOPMENT_ASSET_PATHS = "\"DragDrop/Preview Content\"";
354 | DEVELOPMENT_TEAM = 76J7APB488;
355 | ENABLE_PREVIEWS = YES;
356 | INFOPLIST_FILE = DragDrop/Info.plist;
357 | IPHONEOS_DEPLOYMENT_TARGET = 14.0;
358 | LD_RUNPATH_SEARCH_PATHS = (
359 | "$(inherited)",
360 | "@executable_path/Frameworks",
361 | );
362 | PRODUCT_BUNDLE_IDENTIFIER = com.harshit.DragDrop;
363 | PRODUCT_NAME = "$(TARGET_NAME)";
364 | SWIFT_VERSION = 5.0;
365 | TARGETED_DEVICE_FAMILY = "1,2";
366 | };
367 | name = Release;
368 | };
369 | /* End XCBuildConfiguration section */
370 |
371 | /* Begin XCConfigurationList section */
372 | E186E38426352BF200CDCFB3 /* Build configuration list for PBXProject "DragDrop" */ = {
373 | isa = XCConfigurationList;
374 | buildConfigurations = (
375 | E186E39626352BF300CDCFB3 /* Debug */,
376 | E186E39726352BF300CDCFB3 /* Release */,
377 | );
378 | defaultConfigurationIsVisible = 0;
379 | defaultConfigurationName = Release;
380 | };
381 | E186E39826352BF300CDCFB3 /* Build configuration list for PBXNativeTarget "DragDrop" */ = {
382 | isa = XCConfigurationList;
383 | buildConfigurations = (
384 | E186E39926352BF300CDCFB3 /* Debug */,
385 | E186E39A26352BF300CDCFB3 /* Release */,
386 | );
387 | defaultConfigurationIsVisible = 0;
388 | defaultConfigurationName = Release;
389 | };
390 | /* End XCConfigurationList section */
391 | };
392 | rootObject = E186E38126352BF200CDCFB3 /* Project object */;
393 | }
394 |
--------------------------------------------------------------------------------