sugarcube 1.4.4 → 1.4.5
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.
- data/Gemfile.lock +1 -1
- data/lib/sugarcube-events/uicontrol.rb +1 -1
- data/lib/sugarcube-events/uitextview.rb +1 -1
- data/lib/sugarcube-factories/uibarbuttonitem.rb +1 -1
- data/lib/sugarcube-gestures/gestures.rb +1 -1
- data/lib/sugarcube-uikit/uiviewcontroller.rb +4 -4
- data/lib/sugarcube/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
@@ -72,7 +72,7 @@ private
|
|
72
72
|
self.sugarcube_callbacks(notification) << NSNotificationCenter.defaultCenter.addObserverForName(notification,
|
73
73
|
object: self,
|
74
74
|
queue: NSOperationQueue.mainQueue,
|
75
|
-
usingBlock: block.weak!)
|
75
|
+
usingBlock: block.respond_to?('weak!') ? block.weak! : block)
|
76
76
|
end
|
77
77
|
|
78
78
|
def _offEventNotification(notification)
|
@@ -129,7 +129,7 @@ class UIBarButtonItem
|
|
129
129
|
def set_target_and_action target, action
|
130
130
|
self.target = target
|
131
131
|
self.action = 'sugarcube_handle_action:'
|
132
|
-
@sugarcube_action = action
|
132
|
+
@sugarcube_action = action.respond_to?('weak!') ? action.weak! : action
|
133
133
|
end
|
134
134
|
|
135
135
|
|
@@ -226,7 +226,7 @@ private
|
|
226
226
|
self.addGestureRecognizer(recognizer)
|
227
227
|
|
228
228
|
@sugarcube_recognizers = {} unless @sugarcube_recognizers
|
229
|
-
@sugarcube_recognizers[recognizer] = proc.weak!
|
229
|
+
@sugarcube_recognizers[recognizer] = proc.respond_to?('weak!') ? proc.weak! : proc
|
230
230
|
|
231
231
|
recognizer
|
232
232
|
end
|
@@ -28,11 +28,11 @@ class UINavigationController
|
|
28
28
|
self
|
29
29
|
end
|
30
30
|
|
31
|
-
def pop(
|
32
|
-
if
|
31
|
+
def pop(to_vc=nil)
|
32
|
+
if to_vc == :root
|
33
33
|
self.popToRootViewControllerAnimated(true)
|
34
|
-
elsif
|
35
|
-
self.popToViewController(
|
34
|
+
elsif to_vc
|
35
|
+
self.popToViewController(to_vc, animated: true)
|
36
36
|
else
|
37
37
|
self.popViewControllerAnimated(true)
|
38
38
|
end
|
data/lib/sugarcube/version.rb
CHANGED
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: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2014-
|
15
|
+
date: 2014-02-07 00:00:00.000000000 Z
|
16
16
|
dependencies: []
|
17
17
|
description: ! '== Description
|
18
18
|
|