sugarcube 0.18.20 → 0.18.21
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/README.md
CHANGED
|
@@ -464,8 +464,8 @@ NSError.new('Error Message', code: 404, userInfo: { warnings: ['blabla'] })
|
|
|
464
464
|
"my_font".uifont # => UIFont.fontWithName("my_font", size:UIFont.systemFontSize)
|
|
465
465
|
"my_font".uifont(20) # => UIFont.fontWithName("my_font", size:20)
|
|
466
466
|
|
|
467
|
-
# UIColor from
|
|
468
|
-
"
|
|
467
|
+
# UIColor from image name or hex code
|
|
468
|
+
"pattern".uicolor # => UIColor.colorWithPatternImage(UIImage.imageNamed('pattern'))
|
|
469
469
|
"#ff00ff".uicolor == :fuchsia.uicolor == 0xff00ff.uicolor # => UIColor.colorWithRed(1.0, green:0.0, blue:1.0, alpha:1.0)
|
|
470
470
|
"#f0f".uicolor(0.5) == :fuchsia.uicolor(0.5) == 0xff00ff.uicolor(0.5) # => UIColor.colorWithRed(1.0, green:1.0, blue:1.0, alpha:0.5)
|
|
471
471
|
# note: 0xf0f.uicolor == 0x000f0f.uicolor. There's no way to tell the difference
|
|
@@ -53,37 +53,36 @@ class NSAttributedString
|
|
|
53
53
|
NSTextAlternativesAttributeName = 'NSTextAlternatives'
|
|
54
54
|
|
|
55
55
|
def dummy
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
self.foo = NSNaturalTextAlignment
|
|
56
|
+
foo = NSFontAttributeName
|
|
57
|
+
foo = NSParagraphStyleAttributeName
|
|
58
|
+
foo = NSForegroundColorAttributeName
|
|
59
|
+
foo = NSUnderlineStyleAttributeName
|
|
60
|
+
foo = NSSuperscriptAttributeName
|
|
61
|
+
foo = NSBackgroundColorAttributeName
|
|
62
|
+
foo = NSAttachmentAttributeName
|
|
63
|
+
foo = NSLigatureAttributeName
|
|
64
|
+
foo = NSBaselineOffsetAttributeName
|
|
65
|
+
foo = NSKernAttributeName
|
|
66
|
+
foo = NSLinkAttributeName
|
|
67
|
+
foo = NSStrokeWidthAttributeName
|
|
68
|
+
foo = NSStrokeColorAttributeName
|
|
69
|
+
foo = NSUnderlineColorAttributeName
|
|
70
|
+
foo = NSStrikethroughStyleAttributeName
|
|
71
|
+
foo = NSStrikethroughColorAttributeName
|
|
72
|
+
foo = NSShadowAttributeName
|
|
73
|
+
foo = NSObliquenessAttributeName
|
|
74
|
+
foo = NSExpansionAttributeName
|
|
75
|
+
foo = NSCursorAttributeName
|
|
76
|
+
foo = NSToolTipAttributeName
|
|
77
|
+
foo = NSMarkedClauseSegmentAttributeName
|
|
78
|
+
foo = NSWritingDirectionAttributeName
|
|
79
|
+
foo = NSVerticalGlyphFormAttributeName
|
|
80
|
+
foo = NSTextAlternativesAttributeName
|
|
81
|
+
foo = NSLeftTextAlignment
|
|
82
|
+
foo = NSRightTextAlignment
|
|
83
|
+
foo = NSCenterTextAlignment
|
|
84
|
+
foo = NSJustifiedTextAlignment
|
|
85
|
+
foo = NSNaturalTextAlignment
|
|
87
86
|
end
|
|
88
87
|
|
|
89
88
|
def to_s
|
|
@@ -100,8 +99,8 @@ class NSAttributedString
|
|
|
100
99
|
self.font(font)
|
|
101
100
|
end
|
|
102
101
|
|
|
103
|
-
def
|
|
104
|
-
|
|
102
|
+
def underline
|
|
103
|
+
underline_style(NSUnderlineStyleSingle)
|
|
105
104
|
end
|
|
106
105
|
|
|
107
106
|
# @param font [UIFont] Optional, defaults to UIFont.systemFontOfSize(UIFont.systemFontSize)
|
|
@@ -73,8 +73,8 @@ class UIView
|
|
|
73
73
|
# @overload on_swipe(options)
|
|
74
74
|
# @option options [Fixnum] :fingers Number of fingers before gesture is recognized
|
|
75
75
|
# @option options [Fixnum, Symbol] :direction Direction of swipe, as a UISwipeGestureRecognizerDirection constant or a symbol (`:left, :right, :up, :down`)
|
|
76
|
-
def on_swipe(direction_or_options
|
|
77
|
-
direction =
|
|
76
|
+
def on_swipe(direction_or_options, &proc)
|
|
77
|
+
direction = nil
|
|
78
78
|
fingers = nil
|
|
79
79
|
|
|
80
80
|
if direction_or_options
|
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: 0.18.
|
|
4
|
+
version: 0.18.21
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -13,7 +13,7 @@ authors:
|
|
|
13
13
|
autorequire:
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
|
-
date: 2013-03-
|
|
16
|
+
date: 2013-03-11 00:00:00.000000000 Z
|
|
17
17
|
dependencies: []
|
|
18
18
|
description: ! '== Description
|
|
19
19
|
|