Class: PrimeSlidingMenu::SidebarContainerScreen
- Inherits:
-
ECSlidingViewController
- Object
- ECSlidingViewController
- PrimeSlidingMenu::SidebarContainerScreen
- Includes:
- MotionPrime::ScreenBaseMixin
- Defined in:
- lib/prime_sliding_menu/sidebar_container_screen.rb
Class Method Summary collapse
Instance Method Summary collapse
- #content_controller ⇒ Object
- #content_controller=(c) ⇒ Object
- #gestureRecognizer(gestureRecognizer, shouldReceiveTouch: touch) ⇒ Object
- #hide_sidebar ⇒ Object
- #menu_controller ⇒ Object
- #menu_controller=(c) ⇒ Object
- #show_sidebar ⇒ Object
- #sidebar_visible? ⇒ Boolean
- #toggle_sidebar ⇒ Object
Class Method Details
.new(menu, content, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/prime_sliding_menu/sidebar_container_screen.rb', line 5 def self.new(, content, = {}) screen = self.alloc.initWithTopViewController(nil) screen.on_create(.merge(navigation: false)) if screen.respond_to?(:on_create) screen. = unless .nil? screen.content_controller = content unless content.nil? screen.setAnchorRightRevealAmount 260.0 screen end |
Instance Method Details
#content_controller ⇒ Object
56 57 58 |
# File 'lib/prime_sliding_menu/sidebar_container_screen.rb', line 56 def content_controller self.topViewController end |
#content_controller=(c) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/prime_sliding_menu/sidebar_container_screen.rb', line 39 def content_controller=(c) @content_controller_ref = prepare_controller(c) if should_reinit_content?(@content_controller_ref) self.topViewController = @content_controller_ref @content_controller_ref.view.addGestureRecognizer self.panGesture @content_controller_ref.view.addGestureRecognizer self.resetTapGesture self.resetTapGesture.delegate = self else content_controller.viewControllers = [@content_controller_ref] end end |
#gestureRecognizer(gestureRecognizer, shouldReceiveTouch: touch) ⇒ Object
60 61 62 |
# File 'lib/prime_sliding_menu/sidebar_container_screen.rb', line 60 def gestureRecognizer(gestureRecognizer, shouldReceiveTouch: touch) end |
#hide_sidebar ⇒ Object
18 19 20 |
# File 'lib/prime_sliding_menu/sidebar_container_screen.rb', line 18 def self.resetTopViewAnimated(false) end |
#menu_controller ⇒ Object
52 53 54 |
# File 'lib/prime_sliding_menu/sidebar_container_screen.rb', line 52 def self.underLeftViewController end |
#menu_controller=(c) ⇒ Object
34 35 36 37 |
# File 'lib/prime_sliding_menu/sidebar_container_screen.rb', line 34 def (c) @menu_controller_ref = prepare_controller(c) self.underLeftViewController = @menu_controller_ref end |
#show_sidebar ⇒ Object
14 15 16 |
# File 'lib/prime_sliding_menu/sidebar_container_screen.rb', line 14 def self.anchorTopViewToRightAnimated(false) end |
#sidebar_visible? ⇒ Boolean
30 31 32 |
# File 'lib/prime_sliding_menu/sidebar_container_screen.rb', line 30 def self.currentTopViewPosition == 1 end |
#toggle_sidebar ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/prime_sliding_menu/sidebar_container_screen.rb', line 22 def if ! else end end |