diff --git a/lib/ProMotion/helpers/view_helper.rb b/lib/ProMotion/helpers/view_helper.rb index 3190016..cda20ea 100644 --- a/lib/ProMotion/helpers/view_helper.rb +++ b/lib/ProMotion/helpers/view_helper.rb @@ -70,13 +70,13 @@ module ProMotion end def closest_parent(type) - # iterate up the view hierarchy to find the table containing this cell/view + # iterate up the view hierarchy to find the parent element of "type" containing this view this_view = self.superview while this_view != nil do return this_view if this_view.is_a? type this_view = this_view.superview end - nil # this view is not within a tableView + nil end end end