simple-view 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module SimpleView
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -141,6 +141,7 @@ module SimpleView
141
141
  elsif key.end_with?('Image') || key.end_with?('image')
142
142
  view.setValue value.to_image, forKey: key
143
143
  elsif key == 'layer'
144
+ convert_primitives_to_objects_in_hash value
144
145
  view.layer.setValuesForKeysWithDictionary value
145
146
  else
146
147
  view.setValue value, forKey: key
@@ -36,6 +36,15 @@ describe "SimpleView::ViewBuilder" do
36
36
  end
37
37
  end
38
38
 
39
+ describe "#layer" do
40
+ it "should set layer attributes" do
41
+ view = SimpleView::ViewBuilder.view_for(UIView, layer: {borderWidth: 12, shadowOffset: CGSizeMake(2, 4)})
42
+ view.layer.borderWidth.should == 12
43
+ view.layer.shadowOffset.width.should == 2
44
+ view.layer.shadowOffset.height.should == 4
45
+ end
46
+ end
47
+
39
48
  describe "#backgroundColor" do
40
49
  it "should set backgroundColor by HTML code" do
41
50
  view = SimpleView::ViewBuilder.view_for(UIView, backgroundColor: "#f00")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: