sugarcube 2.7.0 → 2.7.1
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 887111adcadfc5e64dc1f50f649651c2283f052c
|
4
|
+
data.tar.gz: 102dbe9925b7c723a8b23a3711a3ec03d99421dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63cd5a6ba9a81639b8caa2c80a860ffa290693cbeb87339f144584de8c92301e99f8a9f7f24ed385ea183f4c2d8ce8b722a91346a9dad2f65a8b68ed75dbe60d
|
7
|
+
data.tar.gz: 815c0a979776d4f2f1cb316f9ddc94d428f4a1db78e2abe3babc4995dfd7061c3952ebbb869c061d393bc1cd33336a0d962e8109b658b7b9c3597e82071d31a5
|
@@ -137,7 +137,7 @@ class UIView
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
-
# Changes the
|
140
|
+
# Changes the view alpha.
|
141
141
|
def fade(options={}, more_options={}, &after)
|
142
142
|
if options.is_a? Numeric
|
143
143
|
options = { opacity: options }
|
@@ -150,7 +150,7 @@ class UIView
|
|
150
150
|
end
|
151
151
|
end
|
152
152
|
|
153
|
-
# Changes the
|
153
|
+
# Changes the view alpha to 0.
|
154
154
|
# @see #fade
|
155
155
|
def fade_out(options={}, more_options={}, &after)
|
156
156
|
if options.is_a? Numeric
|
@@ -162,7 +162,7 @@ class UIView
|
|
162
162
|
fade(options, &after)
|
163
163
|
end
|
164
164
|
|
165
|
-
# Changes the
|
165
|
+
# Changes the view alpha to 1.
|
166
166
|
# @see #fade
|
167
167
|
def fade_in(options={}, more_options={}, &after)
|
168
168
|
if options.is_a? Numeric
|
@@ -174,7 +174,7 @@ class UIView
|
|
174
174
|
fade(options, &after)
|
175
175
|
end
|
176
176
|
|
177
|
-
# Changes the
|
177
|
+
# Changes the view alpha to 0 and then removes the view from its superview
|
178
178
|
# @see #fade_out
|
179
179
|
def fade_out_and_remove(options={}, more_options={}, &after)
|
180
180
|
if options.is_a? Numeric
|
@@ -8,4 +8,12 @@ class UIButton
|
|
8
8
|
setTitle(value, forState: UIControlStateNormal)
|
9
9
|
end
|
10
10
|
|
11
|
+
def attributedTitle
|
12
|
+
attributedTitleForState(UIControlStateNormal)
|
13
|
+
end
|
14
|
+
|
15
|
+
def setAttributedTitle(value)
|
16
|
+
setAttributedTitle(value, forState: UIControlStateNormal)
|
17
|
+
end
|
18
|
+
|
11
19
|
end
|
data/lib/version.rb
CHANGED
data/spec/ios/numeric_spec.rb
CHANGED
@@ -139,4 +139,8 @@ describe "Numeric" do
|
|
139
139
|
1000.string_with_style(:currency).should == NSNumberFormatter.localizedStringFromNumber(1000, numberStyle:NSNumberFormatterCurrencyStyle)
|
140
140
|
end
|
141
141
|
|
142
|
+
it 'should have a #to_bool method' do
|
143
|
+
0.to_bool.should == false
|
144
|
+
1.to_bool.should == true
|
145
|
+
end
|
142
146
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
describe UIButton do
|
2
|
+
|
3
|
+
before do
|
4
|
+
@subject = UIButton.new
|
5
|
+
end
|
6
|
+
|
7
|
+
it 'should set the title using `title=`' do
|
8
|
+
@subject.title = 'foo'
|
9
|
+
@subject.titleForState(UIControlStateNormal).should == 'foo'
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'should set the title using `setTitle()`' do
|
13
|
+
@subject.setTitle('foo')
|
14
|
+
@subject.titleForState(UIControlStateNormal).should == 'foo'
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should get the title' do
|
18
|
+
@subject.setTitle('foo', forState: UIControlStateNormal)
|
19
|
+
@subject.title.should == 'foo'
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'should set the attributedTitle using `attributedTitle=`' do
|
23
|
+
@subject.attributedTitle = 'foo'.attrd
|
24
|
+
@subject.attributedTitleForState(UIControlStateNormal).should == 'foo'.attrd
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'should set the attributedTitle using `setAttributedTitle()`' do
|
28
|
+
@subject.setAttributedTitle('foo'.attrd)
|
29
|
+
@subject.attributedTitleForState(UIControlStateNormal).should == 'foo'.attrd
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'should get the attributedTitle' do
|
33
|
+
@subject.setAttributedTitle('foo'.attrd, forState: UIControlStateNormal)
|
34
|
+
@subject.attributedTitle.should == 'foo'.attrd
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sugarcube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin T.A. Gray
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-09-
|
14
|
+
date: 2014-09-30 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: |
|
17
17
|
== Description
|
@@ -252,6 +252,7 @@ files:
|
|
252
252
|
- spec/ios/uialertcontroller_spec.rb
|
253
253
|
- spec/ios/uialertview_spec.rb
|
254
254
|
- spec/ios/uibarbuttonitem_spec.rb
|
255
|
+
- spec/ios/uibutton_spec.rb
|
255
256
|
- spec/ios/uicolor_spec.rb
|
256
257
|
- spec/ios/uicontrol_spec.rb
|
257
258
|
- spec/ios/uifont_spec.rb
|
@@ -342,6 +343,7 @@ test_files:
|
|
342
343
|
- spec/ios/uialertcontroller_spec.rb
|
343
344
|
- spec/ios/uialertview_spec.rb
|
344
345
|
- spec/ios/uibarbuttonitem_spec.rb
|
346
|
+
- spec/ios/uibutton_spec.rb
|
345
347
|
- spec/ios/uicolor_spec.rb
|
346
348
|
- spec/ios/uicontrol_spec.rb
|
347
349
|
- spec/ios/uifont_spec.rb
|