Class: PrimeResideMenu::SidebarContainerScreen
- Inherits:
-
RESideMenu
- Object
- RESideMenu
- PrimeResideMenu::SidebarContainerScreen
- Includes:
- MotionPrime::ScreenBaseMixin
- Defined in:
- lib/prime_reside_menu/sidebar_container_screen.rb
Class Method Summary collapse
Instance Method Summary collapse
- #content_controller ⇒ Object
- #content_controller=(c) ⇒ Object
- #hide_sidebar ⇒ Object
- #menu_controller ⇒ Object
- #menu_controller=(c) ⇒ Object
- #show_sidebar ⇒ Object
- #toggle_sidebar ⇒ Object
Class Method Details
.new(menu, content, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/prime_reside_menu/sidebar_container_screen.rb', line 5 def self.new(, content, = {}) screen = self.alloc.initWithContentViewController(nil, menuViewController: nil) screen.parallaxEnabled = false screen.panFromEdge = [:pan_from_edge] if .has_key?(:pan_from_edge) if !Prime::Config..background_image.nil? screen.backgroundImage = Prime::Config..background_image end full_width = UIScreen.mainScreen.bounds.size.width if scale = [:content_scale_value] screen.contentViewScaleValue = scale end x_offset = [:x_offset] || 45 screen.contentViewInPortraitOffsetCenterX = full_width*(1 + screen.contentViewScaleValue/2) - x_offset if y_offset = [:y_offset] screen.contentViewInPortraitOffsetCenterY = UIScreen.mainScreen.bounds.size.height/2 + y_offset end screen.on_create(.merge(navigation: false)) if screen.respond_to?(:on_create) screen. = unless .nil? screen.content_controller = content unless content.nil? screen end |
Instance Method Details
#content_controller ⇒ Object
64 65 66 |
# File 'lib/prime_reside_menu/sidebar_container_screen.rb', line 64 def content_controller self.contentViewController end |
#content_controller=(c) ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'lib/prime_reside_menu/sidebar_container_screen.rb', line 50 def content_controller=(c) @content_controller_ref = prepare_controller(c) if should_reinit_content?(@content_controller_ref) self.setContentViewController(@content_controller_ref) else content_controller.viewControllers = [@content_controller_ref] end end |
#hide_sidebar ⇒ Object
37 38 39 |
# File 'lib/prime_reside_menu/sidebar_container_screen.rb', line 37 def self.hideMenuViewController end |
#menu_controller ⇒ Object
60 61 62 |
# File 'lib/prime_reside_menu/sidebar_container_screen.rb', line 60 def self. end |
#menu_controller=(c) ⇒ Object
45 46 47 48 |
# File 'lib/prime_reside_menu/sidebar_container_screen.rb', line 45 def (c) @menu_controller_ref = prepare_controller(c) self.setMenuViewController(@menu_controller_ref) end |
#show_sidebar ⇒ Object
33 34 35 |
# File 'lib/prime_reside_menu/sidebar_container_screen.rb', line 33 def self.presentMenuViewController end |
#toggle_sidebar ⇒ Object
41 42 43 |
# File 'lib/prime_reside_menu/sidebar_container_screen.rb', line 41 def self.presentMenuViewController end |