lib/ProMotion/screen/nav_bar_module.rb in ProMotion-2.0.0 vs lib/ProMotion/screen/nav_bar_module.rb in ProMotion-2.0.1

- old
+ new

@@ -68,18 +68,24 @@ return bar_button_item_custom(button_type) if button_type.is_a?(UIView) PM.logger.error("Please supply a title string, a UIImage or :system.") && nil end def bar_button_item_image(img, args) - UIBarButtonItem.alloc.initWithImage(img, style: map_bar_button_item_style(args[:style]), target: args[:target] || self, action: args[:action]) + button = UIBarButtonItem.alloc.initWithImage(img, style: map_bar_button_item_style(args[:style]), target: args[:target] || self, action: args[:action]) + button.setTintColor args[:tint_color] if args[:tint_color] + button end def bar_button_item_string(str, args) - UIBarButtonItem.alloc.initWithTitle(str, style: map_bar_button_item_style(args[:style]), target: args[:target] || self, action: args[:action]) + button = UIBarButtonItem.alloc.initWithTitle(str, style: map_bar_button_item_style(args[:style]), target: args[:target] || self, action: args[:action]) + button.setTintColor args[:tint_color] if args[:tint_color] + button end def bar_button_item_system_item(args) - UIBarButtonItem.alloc.initWithBarButtonSystemItem(map_bar_button_system_item(args[:system_item]), target: args[:target] || self, action: args[:action]) + button = UIBarButtonItem.alloc.initWithBarButtonSystemItem(map_bar_button_system_item(args[:system_item]), target: args[:target] || self, action: args[:action]) + button.setTintColor args[:tint_color] if args[:tint_color] + button end def bar_button_item_custom(custom_view) UIBarButtonItem.alloc.initWithCustomView(custom_view) end