javalnanda / JNDropDownMenu

Swift version of https://github.com/dopcn/DOPDropDownMenu
MIT License
64 stars 8 forks source link

Split view controller master not working? #1

Closed FleetPhil closed 7 years ago

FleetPhil commented 7 years ago

Hi - I'm trying to get the drop down menu working on the master list of a split view controller and it looks like there is an incompatibility? If I clone the code from the example and use it on a UItableview controller in the master list of a split view controller only one of the menus is shown, and on the right hand side of the view, if I rotate so only the master list is shown it is displayed correctly.

Is this a known incompatibility? Thanks Phil

javalnanda commented 7 years ago

@hotairforacoolbreeze Are you trying to add for a detail view of split view controller or on the table view itself? Can you share your code/file if possible? This library is not tested to add on top of tableview controller. Would like to know the UI you are trying to achieve.

javalnanda commented 7 years ago

@hotairforacoolbreeze I have marked this as an enhancement. In a future release, I will provide a support to pass custom width, which can be used to set the width of the menu. By default, it takes screen size which does not work properly for the splitViewController. I will try to release an update by tomorrow.

javalnanda commented 7 years ago

@hotairforacoolbreeze update to the latest pod (0.1.4), you can now pass custom width which will allow you to add on splitviewcontroller master list/tableview also. Also, the menu now utilizes entire height of screen related to your confusion that it was only 5 rows. However, please note that for splitviewcontroller, you will not get the correct width of tableview in viewDidLoad(). You will have to keep that in mind while adding menu. Either get width in viewDidAppear() and add menu there but make sure to keep a check it does not get added every time OR pass in custom width you want.

FleetPhil commented 7 years ago

That's great - I will check it out later today. Thanks for the super quick response!