better_toolbar 0.0.1
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.
- checksums.yaml +7 -0
- data/README.md +29 -0
- data/lib/better_toolbar.rb +10 -0
- data/lib/better_toolbar/item.rb +26 -0
- metadata +61 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6d75afd49bb39c9b29f4e52ed42b8b27de23308d
|
4
|
+
data.tar.gz: f54a6a0133fa3a03f8fabbbe691152ccf807baef
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 47c6b4774395d3721b71f374265e855ddf56152d02c7f35b6493fcd79038ef0421623cc5d5aaa04fa3623d8f3731304f9ba985d983adfbe29d3d2d09be500fc7
|
7
|
+
data.tar.gz: f332fdaa7e9e7fd9cfc8c0809046bf5f2ea41bdc323948a55d591f1bdd6f9c52fac21ad09ade1c8895fe4a953b1dc6a0b95a39d990dc280e38eef6bd26fd53d1
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# better_toolbar
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'better_toolbar'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install better_toolbar
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
unless defined?(Motion::Project::Config)
|
4
|
+
raise "This file must be required within a RubyMotion project Rakefile."
|
5
|
+
end
|
6
|
+
|
7
|
+
lib_dir_path = File.dirname(File.expand_path(__FILE__))
|
8
|
+
Motion::Project::App.setup do |app|
|
9
|
+
app.files.unshift(Dir.glob(File.join(lib_dir_path, "better_toolbar/**/*.rb")))
|
10
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module BetterToolbar
|
2
|
+
class Item
|
3
|
+
def self.create(options)
|
4
|
+
item = if options[:title]
|
5
|
+
UIBarButtonItem.alloc.initWithTitle(
|
6
|
+
options[:title],
|
7
|
+
style: UIBarButtonItemStylePlain,
|
8
|
+
target: nil,
|
9
|
+
action: nil
|
10
|
+
)
|
11
|
+
else
|
12
|
+
UIBarButtonItem.alloc.initWithImage(
|
13
|
+
options[:image],
|
14
|
+
style: UIBarButtonItemStylePlain,
|
15
|
+
target: nil,
|
16
|
+
action: nil
|
17
|
+
)
|
18
|
+
end
|
19
|
+
|
20
|
+
item.target = options[:target]
|
21
|
+
item.action = options[:action]
|
22
|
+
|
23
|
+
item
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: better_toolbar
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jack Dean Watson-Hamblin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-08-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
description: A better way to work with toolbars
|
28
|
+
email:
|
29
|
+
- info@fluffyjack.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- README.md
|
35
|
+
- lib/better_toolbar.rb
|
36
|
+
- lib/better_toolbar/item.rb
|
37
|
+
homepage: https://github.com/FluffyJack/better_toolbar
|
38
|
+
licenses:
|
39
|
+
- MIT
|
40
|
+
metadata: {}
|
41
|
+
post_install_message:
|
42
|
+
rdoc_options: []
|
43
|
+
require_paths:
|
44
|
+
- lib
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
requirements: []
|
56
|
+
rubyforge_project:
|
57
|
+
rubygems_version: 2.2.2
|
58
|
+
signing_key:
|
59
|
+
specification_version: 4
|
60
|
+
summary: More ruby like ways to work with UIToolbar and UIBarButtonItems
|
61
|
+
test_files: []
|