Sha256: 645f8c76f1ce3bbe2af16f3b15e5b1ae79b3ea83b5893a6b39cf3fbff53bd696

Contents?: true

Size: 1.84 KB

Versions: 15

Compression:

Stored size: 1.84 KB

Contents

class UIButton
  class << self
    def custom
      self.buttonWithType(UIButtonTypeCustom)
    end
    def rounded
      if self != UIButton
        raise "Custom subclasses of UIButton most be created using UIButton.custom"
      end
      self.buttonWithType(UIButtonTypeRoundedRect)
    end
    def rounded_rect
      if self != UIButton
        raise "Custom subclasses of UIButton most be created using UIButton.custom"
      end
      self.buttonWithType(UIButtonTypeRoundedRect)
    end
    def detail
      if self != UIButton
        raise "Custom subclasses of UIButton most be created using UIButton.custom"
      end
      self.buttonWithType(UIButtonTypeDetailDisclosure)
    end
    def detail_disclosure
      if self != UIButton
        raise "Custom subclasses of UIButton most be created using UIButton.custom"
      end
      self.buttonWithType(UIButtonTypeDetailDisclosure)
    end
    def info
      if self != UIButton
        raise "Custom subclasses of UIButton most be created using UIButton.custom"
      end
      self.buttonWithType(UIButtonTypeInfoLight)
    end
    def info_light
      if self != UIButton
        raise "Custom subclasses of UIButton most be created using UIButton.custom"
      end
      self.buttonWithType(UIButtonTypeInfoLight)
    end
    def info_dark
      if self != UIButton
        raise "Custom subclasses of UIButton most be created using UIButton.custom"
      end
      self.buttonWithType(UIButtonTypeInfoDark)
    end
    def contact
      if self != UIButton
        raise "Custom subclasses of UIButton most be created using UIButton.custom"
      end
      self.buttonWithType(UIButtonTypeContactAdd)
    end
    def contact_add
      if self != UIButton
        raise "Custom subclasses of UIButton most be created using UIButton.custom"
      end
      self.buttonWithType(UIButtonTypeContactAdd)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sugarcube-1.3.5 lib/sugarcube-factories/uibutton.rb
sugarcube-1.3.4 lib/sugarcube-factories/uibutton.rb
sugarcube-1.3.3 lib/sugarcube-factories/uibutton.rb
sugarcube-1.3.2 lib/sugarcube-factories/uibutton.rb
sugarcube-1.3.1 lib/sugarcube-factories/uibutton.rb
sugarcube-1.3.0 lib/sugarcube-factories/uibutton.rb
sugarcube-1.1.0 lib/sugarcube-factories/uibutton.rb
sugarcube-1.0.7 lib/sugarcube-factories/uibutton.rb
sugarcube-1.0.6 lib/sugarcube-factories/uibutton.rb
sugarcube-1.0.5 lib/sugarcube-factories/uibutton.rb
sugarcube-1.0.4 lib/sugarcube-factories/uibutton.rb
sugarcube-1.0.3 lib/sugarcube-factories/uibutton.rb
sugarcube-1.0.2 lib/sugarcube-factories/uibutton.rb
sugarcube-1.0.1 lib/sugarcube-factories/uibutton.rb
sugarcube-1.0.0 lib/sugarcube-factories/uibutton.rb