SwiftyMenu/SwiftyMenu.swift:410: Fatal error:Unexpectedly found nil while implicitly unwrapping an Optional value
JidongHe opened this issue · 2 comments
JidongHe commented
In my project,I try init this menu by code and by storyboard , all of them clash when self.willExpand()
in the file from pods.
my code is
`func setupMenu(){
dropList.delegate = self
dropList.items = sortTypeItems
dropList.configure(with: menuAttributes)
dropList.willExpand = {
print("****SwiftyMenu Code Will Expand!****")
}
}`
and terminal print "SwiftyMenu Code Will Expand!" successful,then next second,project get clash
KarimEbrahemAbdelaziz commented
Hello @JidongHe ,
May I know what is the usecase for using delegate
and closures
at the same time?
I would recommend using only one approach if possible for now. And can you please share the full setup if?
Thank you.