teacup 0.3.9 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,6 +101,9 @@ module Teacup
101
101
  def initialize(name=nil, &block)
102
102
  if name
103
103
  @name = name.to_sym
104
+ if Teacup::Stylesheet[@name]
105
+ NSLog("WARNING: A stylesheet with the name #{@name.inspect} has already been created.")
106
+ end
104
107
  Teacup::Stylesheet[@name] = self
105
108
  end
106
109
 
@@ -1,5 +1,5 @@
1
1
  module Teacup
2
2
 
3
- VERSION = '0.3.9'
3
+ VERSION = '0.3.10'
4
4
 
5
5
  end
@@ -13,6 +13,12 @@ Teacup.handler UIView, :right { |view, r|
13
13
  view.frame = f
14
14
  }
15
15
 
16
+ Teacup.handler UIView, :center_x, :middle_x { |view, x|
17
+ c = view.center
18
+ c.x = x
19
+ view.center = c
20
+ }
21
+
16
22
  Teacup.handler UIView, :top, :y { |view, y|
17
23
  f = view.frame
18
24
  f.origin.y = y
@@ -25,6 +31,12 @@ Teacup.handler UIView, :bottom { |view, b|
25
31
  view.frame = f
26
32
  }
27
33
 
34
+ Teacup.handler UIView, :center_y, :middle_y { |view, y|
35
+ c = view.center
36
+ c.y = y
37
+ view.center = c
38
+ }
39
+
28
40
  Teacup.handler UIView, :width { |view, w|
29
41
  f = view.frame
30
42
  f.size.width = w
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teacup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-26 00:00:00.000000000 Z
12
+ date: 2012-08-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake