rushisangani / RSSelectionMenu

An elegant selection list or dropdown menu for iOS with single or multiple selections.
MIT License
351 stars 91 forks source link

items menu is empty when show as bottomSheet #92

Closed X901 closed 4 years ago

X901 commented 4 years ago

Hi ,

I need to show the menu when click on NavigationBarItem I did use selectionMenu.show(style: .bottomSheet(barButton: settingsButton, height: nil), from: self) the menu did display but without data !

so I did try all

selectionMenu.show(style: .alert(title: "Select", action: nil, height: nil), from: self) and selectionMenu.show(style: .actionSheet(title: nil, action: "Done", height: nil), from: self)

but also without any data !

BTW always I get this error :

2019-12-21 23:11:00.247543+0300 MyApp[36727:1703876] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( "<NSLayoutConstraint:0x60000285a850 UIView:0x7fb0e779f750.width == - 16 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x60000285a850 UIView:0x7fb0e779f750.width == - 16 (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

only when I display it as push I get the data ! selectionMenu.show(style: .push, from: self) and I don't get any error !

rushisangani commented 4 years ago

@X901 Thank you for using this library. I've added an example here to demonstrate how to use Bottom Sheet with a custom class for UITableViewCell.

I'm not sure about your implementation but you should try passing height while presenting a bottom sheet. You can also refer to this with the latest example code.

X901 commented 4 years ago

I follow your code , I did copy everything from you code . and I did add it to my project still doesn't apper !

see the image https://share.getcloudapp.com/RBuX9JoE

your example project working without issue ! even on iPad !

very wired issue =\

rushisangani commented 4 years ago

@X901 Can you share your code?

X901 commented 4 years ago

I did try to give you Demo by delete anything else not related in my project and unexpected it working fine !!! that mean there is issue with my code that let your library don't show data , still I don't know what is it.

X901 commented 4 years ago

I did tried diffrent library https://github.com/Kofktu/KUIPopOver

I faced the same issue ! but after I did it without any library it, working fine without any issue !!

Unfortunately I don't find out what is the reason very weird issue it only happend on current project only !