generated from cs130-w21/template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Drag to dismiss background animation no longer delays * Optimize ipad bill detail display * Fix settle bill navbar button animation * Improve entry item view UI * Add entry row view * Good version before add entry * Still good version * Add entry done * Fix settlement problem * Fix bugs * Add deletion animation for entry rows
- Loading branch information
1 parent
f794ea7
commit 8d051a2
Showing
16 changed files
with
883 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+12.7 KB
(100%)
...deproj/project.xcworkspace/xcuserdata/jackzhao.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
Dots/Dots/Views/ArchivedViews/BillMemberSelection.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
//// | ||
//// BillMemberSelection.swift | ||
//// Dots | ||
//// | ||
//// Created by Jack Zhao on 2/6/21. | ||
//// | ||
// | ||
//import SwiftUI | ||
// | ||
///// Displays responsibility for members in a group in current bill. | ||
//struct BillMemberSelection: View { | ||
// /// members selected | ||
// @Binding var selectedGroup: [Int] | ||
// /// members not selected | ||
// @State var unselectedGroup: [Int] | ||
// /// initiator of current bill | ||
// @Binding var initiator: Int | ||
// @State var showMiddlePrompt: Bool = false | ||
// /// default radius of a selected icon | ||
// let selectedDotsRadius: CGFloat = 80 | ||
// | ||
// @Namespace var namespace | ||
// let rotationOffset: Int = 1 | ||
// /// default radius of an icon | ||
// let circleRadius: Double = 35 | ||
// | ||
// | ||
// var body: some View { | ||
// ZStack { | ||
// ForEachWithIndex(self.unselectedGroup, id: \.self) { i, attendee in | ||
// CircleView(index: attendee, diameter: circleRadius) | ||
// .scaleEffect(self.selectedGroup.contains(attendee) ? 0.6 : 1) | ||
// .offset(y: -selectedDotsRadius) | ||
// .rotationEffect(Angle(degrees: Double(i) * 360.0/Double(self.unselectedGroup.count))) | ||
// .matchedGeometryEffect(id: attendee, in: namespace) | ||
// .onTapGesture { | ||
// withAnimation { | ||
// if self.selectedGroup.contains(attendee) { | ||
// self.selectedGroup.remove(at: self.selectedGroup.firstIndex(of: attendee)!) | ||
// } else { | ||
// self.selectedGroup.append(attendee) | ||
// self.selectedGroup.sort() | ||
// } | ||
// haptic_one_click() | ||
// } | ||
// } | ||
// .onLongPressGesture() { | ||
// self.initiator = attendee | ||
// if !self.selectedGroup.contains(attendee) { | ||
// self.selectedGroup.append(attendee) | ||
// self.selectedGroup.sort() | ||
// } | ||
// } | ||
// } | ||
// | ||
// if (showMiddlePrompt) { | ||
// if self.initiator != -1 { | ||
// CircleView(index: self.initiator, diameter: Double(selectedDotsRadius)) | ||
//// .stroke(style: StrokeStyle(lineWidth: 4, lineCap: .round, dash: [15], dashPhase: 1)) | ||
//// .frame(width: selectedDotsRadius, height: selectedDotsRadius) | ||
// | ||
// } else { | ||
// Circle() | ||
// .stroke(style: StrokeStyle(lineWidth: 4, lineCap: .round, dash: [15], dashPhase: 1)) | ||
// .foregroundColor(Color(UIColor.systemGray)) | ||
// .frame(width: selectedDotsRadius, height: selectedDotsRadius) | ||
// .overlay( | ||
// Text("Drag initiator here") | ||
// .font(.subheadline) | ||
// .fontWeight(.regular) | ||
// .multilineTextAlignment(.center) | ||
// .foregroundColor(Color(UIColor.systemGray)) | ||
// ) | ||
// } | ||
// } | ||
// } | ||
// .frame(width: 2 * selectedDotsRadius + selectedDotsRadius, height: 2 * selectedDotsRadius + selectedDotsRadius) | ||
// | ||
// } | ||
// | ||
// private func xOffset(_ index: Int, show: Bool, amount: Int) -> CGFloat { | ||
// let slice = CGFloat(2 * Double.pi / Double(amount)) | ||
// let r = show ? circleRadius : 0.3 * circleRadius | ||
// let i = index | ||
// return CGFloat(r) * cos(slice * CGFloat(i)) | ||
// } | ||
// | ||
// private func yOffset(_ index: Int, show: Bool, amount: Int) -> CGFloat { | ||
// let slice = CGFloat(2 * Double.pi / Double(amount)) | ||
// let r = circleRadius | ||
// let i = index | ||
// return CGFloat(r) * sin(slice * CGFloat(i)) | ||
// } | ||
//} | ||
// | ||
//struct BillMemberSelection_Previews: PreviewProvider { | ||
// static var previews: some View { | ||
// BillMemberSelection(selectedGroup: .constant([3]), unselectedGroup: [1, 2, 3, 4], initiator: .constant(0)) | ||
// } | ||
//} |
Oops, something went wrong.