sugarcube 0.18.20 → 0.18.21

Sign up to get free protection for your applications and to get access to all the features.
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 color name OR image name OR hex code
468
- "blue".uicolor == :blue.uicolor # => UIColor.blueColor
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
- self.foo = NSFontAttributeName
57
- self.foo = NSParagraphStyleAttributeName
58
- self.foo = NSForegroundColorAttributeName
59
- self.foo = NSUnderlineStyleAttributeName
60
- self.foo = NSSuperscriptAttributeName
61
- self.foo = NSBackgroundColorAttributeName
62
- self.foo = NSAttachmentAttributeName
63
- self.foo = NSLigatureAttributeName
64
- self.foo = NSBaselineOffsetAttributeName
65
- self.foo = NSKernAttributeName
66
- self.foo = NSLinkAttributeName
67
- self.foo = NSStrokeWidthAttributeName
68
- self.foo = NSStrokeColorAttributeName
69
- self.foo = NSUnderlineColorAttributeName
70
- self.foo = NSStrikethroughStyleAttributeName
71
- self.foo = NSStrikethroughColorAttributeName
72
- self.foo = NSShadowAttributeName
73
- self.foo = NSObliquenessAttributeName
74
- self.foo = NSExpansionAttributeName
75
- self.foo = NSCursorAttributeName
76
- self.foo = NSToolTipAttributeName
77
- self.foo = NSMarkedClauseSegmentAttributeName
78
- self.foo = NSWritingDirectionAttributeName
79
- self.foo = NSVerticalGlyphFormAttributeName
80
- self.foo = NSTextAlternativesAttributeName
81
-
82
- self.foo = NSLeftTextAlignment
83
- self.foo = NSRightTextAlignment
84
- self.foo = NSCenterTextAlignment
85
- self.foo = NSJustifiedTextAlignment
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 underlined
104
- underline(NSUnderlinePatternSolid)
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=nil, &proc)
77
- direction = UISwipeGestureRecognizerDirectionRight
76
+ def on_swipe(direction_or_options, &proc)
77
+ direction = nil
78
78
  fingers = nil
79
79
 
80
80
  if direction_or_options
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '0.18.20'
2
+ Version = '0.18.21'
3
3
  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: 0.18.20
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-09 00:00:00.000000000 Z
16
+ date: 2013-03-11 00:00:00.000000000 Z
17
17
  dependencies: []
18
18
  description: ! '== Description
19
19