lib/ProMotion/screen/nav_bar_module.rb in ProMotion-2.4.0 vs lib/ProMotion/screen/nav_bar_module.rb in ProMotion-2.4.1
- old
+ new
@@ -35,11 +35,11 @@
self.navigationItem.setRightBarButtonItems(buttons) if side == :right
end
# TODO: In PM 2.1+, entirely remove this deprecated method.
def set_nav_bar_left_button(title, args={})
- PM.logger.deprecated "set_nav_bar_right_button and set_nav_bar_left_button have been removed. Use set_nav_bar_button :right/:left instead."
+ mp "set_nav_bar_right_button and set_nav_bar_left_button have been removed. Use set_nav_bar_button :right/:left instead.", force_color: :yellow
end
alias_method :set_nav_bar_right_button, :set_nav_bar_left_button
def set_toolbar_items(buttons = [], animated = true)
if buttons
@@ -70,16 +70,16 @@
button_type = args[:image] || args[:button] || args[:custom_view] || args[:title] || "Button"
bar_button_item button_type, args
end
def bar_button_item(button_type, args)
- return PM.logger.deprecated("`system_icon:` no longer supported. Use `system_item:` instead.") if args[:system_icon]
+ return mp("`system_icon:` no longer supported. Use `system_item:` instead.", force_color: :yellow) if args[:system_icon]
return button_type if button_type.is_a?(UIBarButtonItem)
return bar_button_item_system_item(args) if args[:system_item]
return bar_button_item_image(button_type, args) if button_type.is_a?(UIImage)
return bar_button_item_string(button_type, args) if button_type.is_a?(String)
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
+ mp("Please supply a title string, a UIImage or :system.", force_color: :red) && nil
end
def bar_button_item_image(img, args)
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]