teacup 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,7 @@ module Teacup
13
13
  Priorities = {
14
14
  required: 1000, # NSLayoutPriorityRequired
15
15
  high: 750, # NSLayoutPriorityDefaultHigh
16
+ medium: 500,
16
17
  low: 250, # NSLayoutPriorityDefaultLow
17
18
  }
18
19
  Relationships = {
@@ -25,6 +25,10 @@ module Teacup
25
25
  Teacup::Constraint.new(:self, :right).equals(:superview, :right).plus(x)
26
26
  end
27
27
 
28
+ def constrain_center_x(x)
29
+ Teacup::Constraint.new(:self, :center_x).equals(:superview, :center_x).plus(x)
30
+ end
31
+
28
32
  def constrain_top(y)
29
33
  Teacup::Constraint.new(:self, :top).equals(:superview, :top).plus(y)
30
34
  end
@@ -33,6 +37,10 @@ module Teacup
33
37
  Teacup::Constraint.new(:self, :bottom).equals(:superview, :bottom).plus(y)
34
38
  end
35
39
 
40
+ def constrain_center_y(y)
41
+ Teacup::Constraint.new(:self, :center_y).equals(:superview, :center_y).plus(y)
42
+ end
43
+
36
44
  def constrain_width(width)
37
45
  Teacup::Constraint.new(:self, :width).equals(width)
38
46
  end
@@ -1,5 +1,5 @@
1
1
  module Teacup
2
2
 
3
- VERSION = '1.2.4'
3
+ VERSION = '1.2.5'
4
4
 
5
5
  end
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: 1.2.4
4
+ version: 1.2.5
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: 2013-02-06 00:00:00.000000000 Z
12
+ date: 2013-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -140,4 +140,3 @@ test_files:
140
140
  - spec/style_spec.rb
141
141
  - spec/stylesheet_spec.rb
142
142
  - spec/view_spec.rb
143
- has_rdoc: