mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-06-04 19:45:35 +08:00
Better handling of the callback param.
This commit is contained in:
@@ -5,7 +5,7 @@ module ProMotion::MotionTable
|
||||
@refreshing = params[:refreshing] || "Refreshing data..."
|
||||
@updated_format = params[:updated_format] || "Last updated at %s"
|
||||
@updated_time_format = params[:updated_time_format] || "%l:%M %p"
|
||||
@refreshable_callback = params[:callback]
|
||||
@refreshable_callback = params[:callback]|| :on_refresh
|
||||
|
||||
@refresh = UIRefreshControl.alloc.init
|
||||
@refresh.attributedTitle = NSAttributedString.alloc.initWithString(pull_message)
|
||||
|
||||
@@ -26,8 +26,6 @@ module ProMotion
|
||||
|
||||
# Refreshable
|
||||
def refreshable(params = {})
|
||||
params[:callback] = :on_refresh unless params[:callback]
|
||||
|
||||
@refreshable_params = params
|
||||
@refreshable = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user