Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Feature/panelview space #464

Merged
merged 13 commits into from
Jul 22, 2022
Merged

Feature/panelview space #464

merged 13 commits into from
Jul 22, 2022

Conversation

14slash12
Copy link
Contributor

Issue

The Panel had a couple of issues:

  1. When dragging we adjusted the position of the Panel. This caused that not all Mensas/Study Rooms we’re visible.
  2. Sometimes it was possible to drag the Panel above the TabBar which would irritate user and would not allow to scroll inside the ScrollingView.

This fixes the following issue(s):
In order to fix these issues, I decided to redesign the hole Panel. First, instead of changing its position, now the panel is attached to the bottom (i.e. the TabBar) and by dragging the Panel the user changes its height. By changing this all Mensas/Study Rooms are now visible and the panel could never be dragged above the TabBar.

Screenshots

Issues
First Issue:

Simulator.Screen.Recording.-.iPhone.12.-.2022-07-22.at.08.47.42.mp4

Second Issue:

RPReplay_Final1658472764.MOV

See that the Panel is postion adjusted
image

Now the solution:
image

IMPORTANT NOTE:
Due to a suspected SwiftUI bug with the drag gesture to adjust the height and the scrolling of the ScrollView, I decided to add another Rectangle() which has the .gesture() attached instead of the PanelContentView()

See the suspected SwiftUI bug in another DemoApp:

180417073-f2ceaf1d-fbb1-4634-a579-ef457b229e72.mov

Project files of DemoApp:
DragGestureScrollView.zip

See the Rectangle() which is stacked on top of the Panel and will be moved in sycn with the Panel so stick to the top of the panel and has a Spacer() (panelHeight-dragAreaHeight) underneath it.
image

@14slash12 14slash12 self-assigned this Jul 22, 2022
@AW-tum AW-tum merged commit b2568f8 into swiftui Jul 22, 2022
@AW-tum AW-tum deleted the feature/panelview-space branch July 22, 2022 12:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants