Skip to content

A set of floating action buttons that you can swipe left and right, and compress/hide with a down swipe..

Notifications You must be signed in to change notification settings

jvtoomey/Swift-Moveable-Map-Floating-Action-Button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Swift-Moveable-Map-Floating-Action-Button

I always found the Google Maps and Apple Maps iOS apps so cluttered. It also bothered me that you cannot move the floating action button to the left side. Being left-handed, I find it more reachable with my thumb there.

The other problem is the cluttered appearance of so many buttons up the side panel.

I came up with this solution for my app ShareTheres. You can swipe the buttons left and right, plus swipe them up and down. They hide behind each other, with just a little bit peeking out so you can see that it's there.

I'm trying to keep with Don Norman's philosophy here, so enough is visible that you know it's there, as opposed to completely hiding the buttons, which requires you to know they're hiding there.

I find the swiping very smooth and works great. I was worried that I'd have constant accidental taps on the buttons when I was trying to swipe, but it doesn't happen at all. The iPhone is designed very well in this regard, so it consistently (and correctly) distinguishes between a tap on a button and a swipe.

I use UISwipeGestureRecognizers to detect the swipes, and a whole lot of anchors. My next goal is to attempt this type of layout using SwiftUI!

Here's how it looks in action:

moveableButtons

About

A set of floating action buttons that you can swipe left and right, and compress/hide with a down swipe..

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages