Adds styler for separatorInset

This commit is contained in:
David Larrabee
2015-01-13 17:33:07 -05:00
parent aa4990b0ce
commit a40ec82405
2 changed files with 7 additions and 1 deletions

View File

@@ -14,6 +14,10 @@ module RubyMotionQuery
def allows_selection=(value) ; @view.allowsSelection = value ; end
def allows_selection ; @view.allowsSelection ; end
def separator_inset=(value)
@view.separatorInset = value
end
SEPARATOR_STYLES = {
none: UITableViewCellSeparatorStyleNone,
single: UITableViewCellSeparatorStyleSingleLine,
@@ -21,6 +25,5 @@ module RubyMotionQuery
}
end
end
end

View File

@@ -7,6 +7,8 @@ class SyleSheetForUIViewStylerTests < RubyMotionQuery::Stylesheet
st.separator_color = st.separator_color
st.separator_color = UIColor.redColor
st.separator_inset = [0, 46, 0, 0]
st.allows_selection = st.allows_selection
st.allows_selection = false
end
@@ -29,6 +31,7 @@ describe 'stylers/ui_table_view' do
v.separatorStyle.should == UITableViewCellSeparatorStyleNone
v.separatorColor.should == UIColor.redColor
v.allowsSelection.should == false
v.separatorInset.should == UIEdgeInsetsMake(0, 46, 0, 0)
end
end
end