From 207c69c6b6f3628f64c25e427c07e1ede59adddc Mon Sep 17 00:00:00 2001 From: David Ruan Date: Fri, 6 Mar 2015 14:39:02 +0800 Subject: [PATCH 1/3] update gems --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 40f519c..e9ba7a3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,16 +2,16 @@ PATH remote: . specs: sweet-kit (0.4.0) - motion-kit (~> 0.12.0) + motion-kit (~> 0.17.0) sugarcube GEM remote: https://rubygems.org/ specs: dbt (1.1.5) - motion-kit (0.12.0) + motion-kit (0.17.0) dbt (~> 1.1.5) - sugarcube (2.0.2) + sugarcube (3.3.2) PLATFORMS ruby From 57b4c799750978cdc4ce55c4dc5bc46c09abdfef Mon Sep 17 00:00:00 2001 From: David Ruan Date: Fri, 6 Mar 2015 14:39:39 +0800 Subject: [PATCH 2/3] add rounded button --- lib/sweet-kit/ios/layouts/uibutton_helpers.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/sweet-kit/ios/layouts/uibutton_helpers.rb b/lib/sweet-kit/ios/layouts/uibutton_helpers.rb index 7ddd3e0..c0fc031 100644 --- a/lib/sweet-kit/ios/layouts/uibutton_helpers.rb +++ b/lib/sweet-kit/ios/layouts/uibutton_helpers.rb @@ -51,5 +51,12 @@ def image(value, state: state) target.setImage(value, forState: state) end + + def rounded_button(value) + layer do + corner_radius value + masks_to_bounds true + end + end end end From dce1e13e78594b1ee1660c1c35a84c0f4799a193 Mon Sep 17 00:00:00 2001 From: David Ruan Date: Sat, 7 Mar 2015 08:51:08 +0800 Subject: [PATCH 3/3] rename to rounded_corner --- lib/sweet-kit/ios/layouts/uibutton_helpers.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sweet-kit/ios/layouts/uibutton_helpers.rb b/lib/sweet-kit/ios/layouts/uibutton_helpers.rb index c0fc031..0633fc1 100644 --- a/lib/sweet-kit/ios/layouts/uibutton_helpers.rb +++ b/lib/sweet-kit/ios/layouts/uibutton_helpers.rb @@ -52,9 +52,9 @@ def image(value, state: state) end - def rounded_button(value) + def rounded_corner(radius) layer do - corner_radius value + corner_radius radius masks_to_bounds true end end