motion-accessibility 2.1 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c09c14b80650cbf3bb0c741c0add8d2a98a93b16
|
4
|
+
data.tar.gz: 59ec108344d57422fca195a3237f1497efc2a496
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 479339e0aab7ae9f0d8cbc5c953e970849cbfcc238afc834c2c5bed988d8c75c2c63128290121e6aab8218fc9fe245e4021e65681d30a037621298dc4e479cc2
|
7
|
+
data.tar.gz: 34cb1ca30f82dd3bdf6d3d5c910f302b3591291df043a65a2af4ec97f539f79f9dddc99327cabf764d0288a450e694226ff917352dfde055046d2aae8cc68685
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ https://github.com/austinseraphin/motion-accessibility
|
|
6
6
|
|
7
7
|
Motion-Accessibility wraps the UIAccessibility protocols in nice
|
8
8
|
ruby. I hope that making them easier will encourage developers to use it
|
9
|
-
more and make their apps accessible.
|
9
|
+
more and make their apps accessible. The gem also includes an accessibility inspector and a text console to aide blind iOS developers.
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
|
@@ -41,30 +41,30 @@ def self.start_refreshing
|
|
41
41
|
if !A11y::Data[:refresh]&&RUBYMOTION_ENV!='test'
|
42
42
|
NSTimer.scheduledTimerWithTimeInterval(Update_Delay, target: self, selector: 'refresh', userInfo: nil, repeats: true)
|
43
43
|
A11y::Data[:refresh]=true
|
44
|
-
|
44
|
+
A11y::Console.init
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
def
|
49
|
-
|
50
|
-
|
48
|
+
def browse(request=nil)
|
49
|
+
A11y::Console.init unless $browser_current
|
50
|
+
A11y::Console.start_refreshing
|
51
51
|
request=0 if request==:back
|
52
52
|
if request.nil?
|
53
53
|
elsif request==:top||request==:refresh
|
54
|
-
|
54
|
+
A11y::Console.init
|
55
55
|
$browser_current=$browser_tree
|
56
56
|
$browser_path.clear
|
57
57
|
elsif request==0
|
58
58
|
raise "You cannot go back any further" if $browser_path.length<2
|
59
59
|
$browser_path.pop
|
60
60
|
$browser_current=$browser_path.last
|
61
|
-
|
61
|
+
A11y::Console.init unless A11y::Data[:refresh]
|
62
62
|
elsif request==:scroll
|
63
63
|
raise "This view cannot scroll" unless A11y::Console.scrollable_view?($browser_current.view)
|
64
64
|
below=CGRect.new([0, $browser_current.view.size.height], $browser_current.view.size)
|
65
65
|
$browser_current.view.scrollRectToVisible(below, animated: false)
|
66
66
|
else
|
67
|
-
|
67
|
+
A11y::Console.init unless $browser_tree
|
68
68
|
$browser_current=$browser_tree unless $browser_current
|
69
69
|
found=$browser_current.find(request)
|
70
70
|
if found
|
@@ -72,29 +72,29 @@ if found.subviews.empty?
|
|
72
72
|
$browser_cursor=found
|
73
73
|
return found.view.inspect_a11y
|
74
74
|
end
|
75
|
-
|
75
|
+
A11y::Console.init unless A11y::Data[:refresh]
|
76
76
|
$browser_current=found
|
77
77
|
$browser_path<<found
|
78
78
|
end
|
79
79
|
end
|
80
80
|
$browser_cursor=$browser_current
|
81
|
-
|
81
|
+
A11y::Console.display_views
|
82
82
|
nil
|
83
83
|
end
|
84
84
|
|
85
85
|
def self.refresh
|
86
|
-
|
86
|
+
A11y::Console.init
|
87
87
|
$before=$browser_tree.copy unless $before
|
88
88
|
unless $browser_tree==$before
|
89
89
|
puts "The screen has changed."
|
90
|
-
|
90
|
+
A11y::Console.browse :top
|
91
91
|
puts "(Main)> "
|
92
92
|
end
|
93
93
|
$before=$browser_tree.copy
|
94
94
|
end
|
95
95
|
|
96
|
-
def
|
97
|
-
|
96
|
+
def view(request=nil)
|
97
|
+
A11y::Console.init unless A11y::Data[:refresh]
|
98
98
|
$browser_current=$browser_tree unless $browser_current
|
99
99
|
$browser_cursor=$browser_tree unless $browser_cursor
|
100
100
|
return $browser_cursor.view unless request
|
@@ -104,6 +104,7 @@ $browser_cursor=result
|
|
104
104
|
result.view
|
105
105
|
end
|
106
106
|
|
107
|
+
module_function :browse, :view
|
107
108
|
alias :b :browse
|
108
109
|
alias :v :view
|
109
110
|
|
@@ -19,7 +19,8 @@ other
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def ==(other)
|
22
|
-
return false
|
22
|
+
return false if other.nil?
|
23
|
+
return false if self.superview&&other.superview&&self.superview.view!=other.superview.view
|
23
24
|
return false unless self.view==other.view
|
24
25
|
return false unless self.subviews.size==other.subviews.size
|
25
26
|
self.subviews.each_index {|index| return false unless self.subviews[index]==other.subviews[index]}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-accessibility
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Seraphin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|