diff --git a/lib/ProMotion/screens/_tables/table_view_cell_module.rb b/lib/ProMotion/screens/_tables/table_view_cell_module.rb index 1971afc..00b47c1 100644 --- a/lib/ProMotion/screens/_tables/table_view_cell_module.rb +++ b/lib/ProMotion/screens/_tables/table_view_cell_module.rb @@ -44,9 +44,7 @@ module ProMotion if data_cell[:accessory_view] self.accessoryView = data_cell[:accessory_view] self.accessoryView.autoresizingMask = UIViewAutoresizingFlexibleWidth - end - - if data_cell[:accessory] && data_cell[:accessory] == :switch + elsif data_cell[:accessory] && data_cell[:accessory] == :switch switch_view = UISwitch.alloc.initWithFrame(CGRectZero) switch_view.addTarget(self, action: "accessory_toggled_switch:", forControlEvents:UIControlEventValueChanged) switch_view.on = true if data_cell[:accessory_checked]