motion-stylez 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3bd7292a67cd3bb09b4967b2d51141a61509aee9
4
- data.tar.gz: 0af50715e670038c0253b1986d880c0584dfe51f
3
+ metadata.gz: 7adeb8a4e78398e355f82e73e2a4836faafc727b
4
+ data.tar.gz: 74a11290ba45c6871375d84c29ff7f4f042647c8
5
5
  SHA512:
6
- metadata.gz: 363537296a5174d8a9c11a3c0c097cea1572f95784ab48c3548233ecbafa6b94e623dd9d3b3db6be3b20f40bf2eb6c81e2b604679228cd64548ffe7d5e1a9a42
7
- data.tar.gz: b560967aa9b4f2e209a3a81fbd31626bd9473888f65576c87a346c566a3430853865e51932ea3420e7023caf3a7548d9b22862d060f3f67b202bc9fa6e74cc57
6
+ metadata.gz: 409cc331153fcd494cd611d1e672d73e36e340eb9e3dfd3e10fb3d40bb84c568fa299fa7c7065b159290a9fcbc520a28c5579f7d138a9eb1716b25e78553fcd9
7
+ data.tar.gz: d4c43cc76f93db93b02b7f7fbc26032c6710c89807eb482ff3600d47fb46dbdeb46519ccbdb33c0067604fa0ee9b919fbd1d30d5be71344e6519068216269d9d
data/README.md CHANGED
@@ -53,11 +53,18 @@ class MyViewController < UIViewController
53
53
 
54
54
  z.stylesheet = MyStylesheet.new # works absolutely anywhere
55
55
 
56
- z(self.view).style(:white_bg)
56
+ z(self.view, :white_bg)
57
57
 
58
- self.view.addSubview(z(UILabel).style(:bw_big) do |v|
58
+ self.view.addSubview(z(UILabel, :bw_big) do |v|
59
59
  v.text = "Testing"
60
60
  end)
61
+
62
+ # OR YOU CAN DO THE LONG WAY
63
+ # z(self.view).style(:white_bg)
64
+ #
65
+ # self.view.addSubview(z(UILabel).style(:bw_big) do |v|
66
+ # v.text = "Testing"
67
+ # end)
61
68
 
62
69
  end
63
70
  end
@@ -4,11 +4,18 @@ class MyViewController < UIViewController
4
4
 
5
5
  z.stylesheet = MyStylesheet.new # works absolutely anywhere
6
6
 
7
- z(self.view).style(:white_bg)
7
+ z(self.view, :white_bg)
8
8
 
9
- self.view.addSubview(z(UILabel).style(:bw_big) do |v|
9
+ self.view.addSubview(z(UILabel, :bw_big) do |v|
10
10
  v.text = "Testing"
11
11
  end)
12
+
13
+ # OR YOU CAN DO THE LONG WAY
14
+ # z(self.view).style(:white_bg)
15
+ #
16
+ # self.view.addSubview(z(UILabel).style(:bw_big) do |v|
17
+ # v.text = "Testing"
18
+ # end)
12
19
 
13
20
  end
14
21
  end
@@ -1,6 +1,10 @@
1
1
  class Object
2
- def z(selector = nil)
2
+ def z(selector = nil, style = nil, &block)
3
3
  MotionStylez::Base.shared.selector = selector
4
- MotionStylez::Base.shared
4
+ if selector && style
5
+ MotionStylez::Base.shared.style(style, &block)
6
+ else
7
+ MotionStylez::Base.shared
8
+ end
5
9
  end
6
10
  end
@@ -1,3 +1,3 @@
1
1
  module MotionStylez
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-stylez
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Dean Watson-Hamblin