Skip to content

Commit

Permalink
Merge pull request #221 from infinitered/table_cell_separator_insets
Browse files Browse the repository at this point in the history
Adds separator_inset for UITableViewCell styler.
  • Loading branch information
GantMan committed Mar 19, 2015
2 parents 4f91ccd + 1bb099d commit 54208ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions motion/ruby_motion_query/stylers/ui_table_view_cell_styler.rb
Expand Up @@ -54,6 +54,13 @@ def detail_font=(v)
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
Expand Down
4 changes: 4 additions & 0 deletions spec/stylers/ui_table_view_cell_styler_spec.rb
Expand Up @@ -6,6 +6,8 @@ def ui_table_view_cell_kitchen_sink(st)
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

Expand All @@ -27,13 +29,15 @@ def ui_table_view_cell_kitchen_sink(st)
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|
st.text_color.should.equal(rmq.color.red)
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

Expand Down

0 comments on commit 54208ee

Please sign in to comment.