Closed eliduke closed 9 years ago
I checked the source code and figured it out. I just needed to pass in nil
for the first argument.
open Navigation.new(nil, user: user)
https://github.com/infinitered/ProMotion-menu/blob/master/lib/ProMotion/menu/drawer.rb#L9
def self.new(center=nil, options={})
menu = alloc.init
menu.send(:auto_setup, center, options)
menu
end
Issue has been fixed in master as of today
Apologize about bringing up old issue
I am using a
PM::Menu::Drawer
class calledNavigation
that looks like this:And I am opening it in my
app_delegate
with a super simpleopen Navigation
. It’s amazing. Sometimes I can't believe how simple it all is. Anyhoo, I am wondering if it’s possible to pass something into thatopen
command so I could have access to in myNavigation
class?I tried
open Navigation.new(user: "Username")
in myapp_delegate
, put aattr_accessor :user
in myNavigation
class, but I keep getting this error:It's as if a
PM::Menu::Drawer
can't receive parameters and so ProMotion thinks it's Screen and not a Menu? Thoughts? Anyone?