From 1bb099d13f0eb54e5edc2b81f35fdaaf8e4062e4 Mon Sep 17 00:00:00 2001 From: Mark Rickert Date: Wed, 18 Mar 2015 18:33:16 -0400 Subject: [PATCH] Adds separator_inset for UITableViewCell styler. --- .../ruby_motion_query/stylers/ui_table_view_cell_styler.rb | 7 +++++++ spec/stylers/ui_table_view_cell_styler_spec.rb | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/motion/ruby_motion_query/stylers/ui_table_view_cell_styler.rb b/motion/ruby_motion_query/stylers/ui_table_view_cell_styler.rb index ae4eacc..fdec99a 100644 --- a/motion/ruby_motion_query/stylers/ui_table_view_cell_styler.rb +++ b/motion/ruby_motion_query/stylers/ui_table_view_cell_styler.rb @@ -54,6 +54,13 @@ module RubyMotionQuery def selection_style ; @view.selectionStyle ; end def selection_style=(v) ; @view.selectionStyle = v ; end + def separator_inset=(value) + @view.separatorInset = value + end + def separator_inset + @view.separatorInset + end + end end diff --git a/spec/stylers/ui_table_view_cell_styler_spec.rb b/spec/stylers/ui_table_view_cell_styler_spec.rb index 350decd..4930521 100644 --- a/spec/stylers/ui_table_view_cell_styler_spec.rb +++ b/spec/stylers/ui_table_view_cell_styler_spec.rb @@ -6,6 +6,8 @@ class StyleSheetForUIViewStylerTests < RubyMotionQuery::Stylesheet st.selection_style = UITableViewCellSelectionStyleBlue st.detail_text_color = rmq.color.green st.detail_font = rmq.font.system(11) + st.separator_inset = UIEdgeInsetsMake(0, 10, 0, -20) + end end @@ -27,6 +29,7 @@ describe 'stylers/ui_table_view_cell' do c.selectionStyle.should.equal(UITableViewCellSelectionStyleBlue) c.detailTextLabel.textColor.should.equal(rmq.color.green) c.detailTextLabel.font.should.equal(rmq.font.system(11)) + c.separatorInset.should.equal(UIEdgeInsetsMake(0, 10, 0, -20)) end @vc.rmq(cell).style do |st| @@ -34,6 +37,7 @@ describe 'stylers/ui_table_view_cell' do st.detail_text_color.should.equal(rmq.color.green) st.font.should.equal(rmq.font.system(15)) st.detail_font.should.equal(rmq.font.system(11)) + st.separator_inset.should.equal(UIEdgeInsetsMake(0, 10, 0, -20)) end end