mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-06-04 19:45:35 +08:00
Add a warning if the user didn't implement the on_refresh method or they specified a callback method but didn't implement it.
This commit is contained in:
@@ -19,7 +19,11 @@ module ProMotion::MotionTable
|
||||
# UIRefreshControl Delegates
|
||||
def refreshView(refresh)
|
||||
refresh.attributedTitle = NSAttributedString.alloc.initWithString(@refreshing)
|
||||
self.send(@refreshable_callback) if @refreshable_callback
|
||||
if @refreshable_callback && self.respondsToSelector(@refreshable_callback)
|
||||
self.send(@refreshable_callback)
|
||||
else
|
||||
ProMotion::Console.log("ProMotion Warning: you must implement an on_refresh method in your TableScreen.", with_color: ProMotion::Console::RED_COLOR)
|
||||
end
|
||||
end
|
||||
|
||||
def start_refreshing
|
||||
|
||||
Reference in New Issue
Block a user