Merge pull request #221 from infinitered/table_cell_separator_insets

Adds separator_inset for UITableViewCell styler.
This commit is contained in:
Gant Laborde
2015-03-18 19:27:41 -05:00
2 changed files with 11 additions and 0 deletions

View File

@@ -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

View File

@@ -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