mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-05-30 17:33:53 +08:00
Use PM.logger.deprecated instead of warn all over the place.
This commit is contained in:
@@ -2,7 +2,7 @@ module ProMotion
|
||||
class MeasureHelper
|
||||
class << self
|
||||
def content_height(view)
|
||||
warn "[DEPRECATION] `MeasureHelper.content_height` is deprecated. Include the module `ScreenElements` to get access to this method (already included in Screen)."
|
||||
PM.logger.deprecated "`MeasureHelper.content_height` is deprecated. Include the module `ScreenElements` to get access to this method (already included in Screen)."
|
||||
|
||||
height = 0
|
||||
view.subviews.each do |subview|
|
||||
@@ -17,4 +17,4 @@ module ProMotion
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -126,7 +126,7 @@ module ProMotion
|
||||
|
||||
# [DEPRECATED]
|
||||
def set_view_controller(vc)
|
||||
warn "[DEPRECATION] `set_view_controller` is deprecated and discontinued. Please inherit from the UIViewController you wish to use and include ProMotion::ScreenViewController instead."
|
||||
PM.logger.deprecated "`set_view_controller` is deprecated and discontinued. Please inherit from the UIViewController you wish to use and include ProMotion::ScreenViewController instead."
|
||||
self
|
||||
end
|
||||
|
||||
@@ -153,7 +153,7 @@ module ProMotion
|
||||
def on_disappear; end
|
||||
|
||||
def view_controller
|
||||
warn "[DEPRECATION] `view_controller` is deprecated, as screens are now UIViewController subclasses."
|
||||
PM.logger.deprecated "`view_controller` is deprecated, as screens are now UIViewController subclasses."
|
||||
self
|
||||
end
|
||||
|
||||
|
||||
@@ -119,13 +119,13 @@ module ProMotion
|
||||
|
||||
mappings.each_pair do |n, old|
|
||||
if data_cell[old]
|
||||
warn "[DEPRECATION] `:#{old}` is deprecated in TableScreens. Use `:#{n}`"
|
||||
PM.logger.deprecated "`:#{old}` is deprecated in TableScreens. Use `:#{n}`"
|
||||
data_cell[n] = data_cell[old]
|
||||
end
|
||||
end
|
||||
|
||||
if data_cell[:styles] && data_cell[:styles][:textLabel]
|
||||
warn "[DEPRECATION] `:textLabel` is deprecated in TableScreens. Use `:label`"
|
||||
PM.logger.deprecated "`:textLabel` is deprecated in TableScreens. Use `:label`"
|
||||
data_cell[:styles][:label] = data_cell[:styles][:textLabel]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user