Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

easy-button

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-button

  • 0.0.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Easy Button for RubyMotion

A nice looking button in RubyMotion that extends the UIButton class and adds a couple properties for easy styling.

Just pass a single hex value to backgroundColor and get a nice gradient button with a shadow.

You can also more easily set the borderRadius, font, textColor, and title for the button's label. Everything else works just like a UIButton!

Install

I find it very easy to use Bundler to manage gems in RubyMotion.

Rakefile

$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'bundler'
Bundler.require

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.
  app.name = 'Testing'
end

Gemfile

source :rubygems

gem 'easy-button'

Run bundle install.

Usage

@button = EasyButton.alloc.initWithFrame([[10, 160], [300, 80]])
@button.backgroundColor = '#ff0000'
@button.borderRadius = 14
@button.font = UIFont.boldSystemFontOfSize(26)
@button.textColor = '#fff'
@button.title = "That Was Easy!"

Screenshot

Easy Button Screenshot

Thanks

Thanks to @seanlilmateus for the inspiration and a bunch of code from CoolButton!

FAQs

Package last updated on 15 Jun 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc