class SwipeableCell
Attributes
index_path[RW]
Public Instance Methods
close()
click to toggle source
# File lib/pm_swipe_cells/swipeable_cell.rb, line 48 def close self.hideUtilityButtonsAnimated(true) end
config(opts = {})
click to toggle source
# File lib/pm_swipe_cells/swipeable_cell.rb, line 35 def config(opts = {}) @right_buttons = opts[:right_buttons] if opts[:right_buttons] @left_buttons = opts[:left_buttons] if opts[:left_buttons] [@right_buttons, @left_buttons].each {|x| add_index_path_argument(x) unless x.nil?} if @right_buttons self.rightUtilityButtons = add_right_buttons(@right_buttons) end if @left_buttons self.leftUtilityButtons = add_left_buttons(@left_buttons) end end
Private Instance Methods
add_index_path_argument(buttons)
click to toggle source
# File lib/pm_swipe_cells/swipeable_cell.rb, line 60 def add_index_path_argument(buttons) buttons.each do |x| arity = self.delegate.method(x[:action]).arity if arity == 1 and x[:arguments].nil? x[:arguments] = self end end end