lib/ProMotion/thirdparty/formotion_screen.rb in ProMotion-1.0.4 vs lib/ProMotion/thirdparty/formotion_screen.rb in ProMotion-1.1.0.rc1

- old
+ new

@@ -1,10 +1,10 @@ module ProMotion if defined?(Formotion) && defined?(Formotion::FormController) class FormotionScreen < Formotion::FormController include ProMotion::ScreenModule - + def self.new(args = {}) s = self.alloc.initWithStyle(UITableViewStyleGrouped) s.on_create(args) if s.respond_to?(:on_create) if s.respond_to?(:table_data) @@ -17,23 +17,25 @@ t = s.title # Formotion kills the title when you request tableView. s.tableView.allowsSelectionDuringEditing = true s.title = t + s.form.on_submit { |form| s.on_submit(form) if s.respond_to?(:on_submit) } + s end # emulate the ProMotion table update for formotion def update_table_data self.form = table_data self.form.controller = self self.tableView.reloadData end - + def screen_setup self.title = self.class.send(:get_title) end - + def loadView super self.send(:on_load) if self.respond_to?(:on_load) end