mirror of
https://github.com/zhigang1992/rmq.git
synced 2026-01-12 22:51:53 +08:00
Merge pull request #167 from squidpunch/add-separator-inset
Adds styler for separatorInset and rowHeight for table
This commit is contained in:
@@ -14,6 +14,14 @@ module RubyMotionQuery
|
||||
def allows_selection=(value) ; @view.allowsSelection = value ; end
|
||||
def allows_selection ; @view.allowsSelection ; end
|
||||
|
||||
def separator_inset=(value)
|
||||
@view.separatorInset = value
|
||||
end
|
||||
|
||||
def row_height=(value)
|
||||
@view.rowHeight = value
|
||||
end
|
||||
|
||||
SEPARATOR_STYLES = {
|
||||
none: UITableViewCellSeparatorStyleNone,
|
||||
single: UITableViewCellSeparatorStyleSingleLine,
|
||||
@@ -21,6 +29,5 @@ module RubyMotionQuery
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,8 +7,11 @@ 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
|
||||
st.row_height = 20
|
||||
end
|
||||
|
||||
end
|
||||
@@ -29,6 +32,8 @@ 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)
|
||||
v.rowHeight.should == 20
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user