KarimEbrahemAbdelaziz / SwiftyMenu

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

setting the current selectedIndex programmatically doesn't show the selecteditem #21

Closed aviya-smila closed 3 years ago

aviya-smila commented 3 years ago

Hi, I'm facing an issue when setting the current selectedIndex programmatically doesn't show the selected item. when trying to debug I noticed that the button does'nt include any uilabel.

hukjordanjanaq commented 3 years ago

I did it on viewDidAppear and it works. Maybe the view is not setting the selection when it's created.

KarimEbrahemAbdelaziz commented 3 years ago

Hi @aviya-smila ,

Just as @jordanjanaq said, you need to set it in viewDidAppear as I didn't set the selection while creating the view.

Thank you :)