KarimEbrahemAbdelaziz / SwiftyMenu

Simple and Elegant Drop down menu for iOS 🔥💥
MIT License
573 stars 56 forks source link

Updated the SingleSelect menu for when hideOptionsWhenSelect is True #24

Closed KitsuneNoctus closed 3 years ago

KitsuneNoctus commented 3 years ago

PR - pt. 1

There was an issue in which when isMultiSelect is set to false and hideOptionsWhenSelect is set to true that the menu would drop down for a selection, would allow for selection. When an item is selected, the menu will then collapse as it should.

The issue came when I would come to expand the menu again that it would not drop down on the initial touch interaction, though the arrow indicating the current state of the menu would animate. Upon pressing it a second time the menu would expand. This bug occurred every time after a selection was made. Nothing would be broken, but it was a simple style issue that would cause users to slow down and such.

The issue seemed to be that when a selection was made, the toggle method that switched the SwiftyMenuState would not trigger for some reason.

The change that needed to be made was at lines 299, 309, 315, and 325. I simply changed it from calling the method collapseSwiftyMenu() to the method handleMenuState() in order to trigger the toggle.

Fixes # 1

Type of change

How Has This Been Tested?

This was tested via a simple user testing method in which I would update the pods on the example project and run the project to test if the menu was still having the same issues after the changes were made.

Test Configuration:

Checklist:

PR - pt. 2

Created a changes based on the list of TODO's on the main project page. Attempted to create a change where the menu would close when you would tap on the parent view, but could not get touches out of the menu to be recognized. Then went to attempt at making a user friendly method for separator styling. It can edit color, visibility, and blur effects so far.

Type of change

How Has This Been Tested?

Using the simulator and adding and example of the method to the example project. Tested over and over again to try and get different effects. What is pushed now is what I could achieve in the time frame.

Test Configuration:

Checklist:

PR Issue

The issue with the build is something I attempted to remedy by installing more versions of the os, but this did not seem to remedy the issue at hand.

KitsuneNoctus commented 3 years ago

Is there anything that needs work on this in particular @KarimEbrahemAbdelaziz

KarimEbrahemAbdelaziz commented 3 years ago

Hi @KitsuneNoctus ,

What an amazing PR 🔥 I will review and test it myself ASAP.

I need to make 2 changes to this PR to be able to merge it.

  1. Update pod version number.
  2. Update README file with your awesome changes.