-
Couldn't load subscription status.
- Fork 29
Open
Description
border = UI::View.new
{
background_color: :black,
width: 50,
height: 50,
align_self: :center
}.each do |k, v|
border.send("#{k}=", v)
end
end
view.add_child border
view.update_layoutThis however works:
border = UI::View.new
{
background_color: :black,
width: 50,
height: 50,
align_self: :center
}.each do |k, v|
if v == :center
border.send("#{k}=", :center)
else
border.send("#{k}=", v)
end
end
end
view.add_child border
view.update_layoutThe following properties would be impacted because of this (I think):
- direction, "inherit", "ltr", "rtl"
- flex_direction, "column", "column_reverse", "row", "row_reverse"
- justify_content, "flex_start", "center", "flex_end", "space_between", "space_around"
- align_content, "auto", "flex_start", "center", "flex_end", "stretch"
- align_items, "auto", "flex_start", "center", "flex_end", "stretch"
- align_self, "auto", "flex_start", "center", "flex_end", "stretch"
- position_type, "relative", "absolute"
- flex_wrap, "no_wrap", "wrap"