MIMInputToolbar 0.0.1 → 0.0.2
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 +4 -4
- data/README.md +8 -0
- data/lib/project/MIMInputToolbar.rb +13 -0
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13b3738510e952f16aca0de25a79037f27c9aca7
|
4
|
+
data.tar.gz: 34f56646c24e7d6c5978e143db985e18d8c690d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d142f953d5e3c9bd3c5d07d103e61d41553208b7bb0ada8ff56de479280f77ad45baa3a3a7f10b0c4ed9448fe3d6e46c8ec7254906ee89bfaf7e2d7a1904d99e
|
7
|
+
data.tar.gz: f59116422e912540ca3ab56cfd3b84e35f9754ede2d34ef116fdeaaed932a0dc8cb70f3257e426f8bd1d8cb23946ca325cc47cc65e32957469f0fd70de674594
|
data/README.md
CHANGED
@@ -38,6 +38,14 @@ Then finally, give the instance all the fields (in the correct order) that it wi
|
|
38
38
|
@field_bar.fields = [@text_field_one, @text_field_two, @text_field_three]
|
39
39
|
```
|
40
40
|
|
41
|
+
You can optionally set the title for the `Previous` / `Next` / and `Done` buttons like so
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
@field_bar.previous_title = " < "
|
45
|
+
@field_bar.next_title = " > "
|
46
|
+
@field_bar.done_title = "Complete"
|
47
|
+
```
|
48
|
+
|
41
49
|
This works really well with the [TPKeyboardAvoiding](https://github.com/michaeltyson/TPKeyboardAvoiding).
|
42
50
|
|
43
51
|
## Contributing
|
@@ -3,6 +3,7 @@ class MIMInputToolbar < UIToolbar
|
|
3
3
|
|
4
4
|
def init
|
5
5
|
super
|
6
|
+
@fields ||= []
|
6
7
|
|
7
8
|
self.items = [
|
8
9
|
UIBarButtonItem.alloc.initWithTitle('Previous', style: UIBarButtonItemStylePlain, target: self, action: 'previous_field:'),
|
@@ -16,6 +17,18 @@ class MIMInputToolbar < UIToolbar
|
|
16
17
|
self
|
17
18
|
end
|
18
19
|
|
20
|
+
def previous_title=(title)
|
21
|
+
self.items[0].title = title
|
22
|
+
end
|
23
|
+
|
24
|
+
def next_title=(title)
|
25
|
+
self.items[1].title = title
|
26
|
+
end
|
27
|
+
|
28
|
+
def done_title=(title)
|
29
|
+
self.items[3].title = title
|
30
|
+
end
|
31
|
+
|
19
32
|
def previous_field(sender)
|
20
33
|
index = fields.index(selected_field)
|
21
34
|
if index >= 1
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: MIMInputToolbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Dean Watson-Hamblin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
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'
|
11
|
+
date: 2014-07-19 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
27
13
|
description: Simple UIToolbar subclass with next, previous, and done buttons.
|
28
14
|
email:
|
29
15
|
- info@fluffyjack.com
|
@@ -54,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
40
|
version: '0'
|
55
41
|
requirements: []
|
56
42
|
rubyforge_project:
|
57
|
-
rubygems_version: 2.
|
43
|
+
rubygems_version: 2.2.2
|
58
44
|
signing_key:
|
59
45
|
specification_version: 4
|
60
46
|
summary: UIToolbar subclass for your input accessory view
|