summaryrefslogtreecommitdiff
path: root/docs/Classes/SDLTouchManager.html
blob: 2d1d87025e9f444d8f506c9e4002c996c1247535 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<h1>SDLTouchManager Class Reference</h1>

<h3>Section Contents</h3>

<ul>
  <li><a href="#section-touchEventDelegate">touchEventDelegate</a></li>
  <li><a href="#section-touchEventHandler">touchEventHandler</a></li>
  <li><a href="#section-tapDistanceThreshold">tapDistanceThreshold</a></li>
  <li><a href="#section-tapTimeThreshold">tapTimeThreshold</a></li>
  <li><a href="#section-movementTimeThreshold">movementTimeThreshold</a></li>
  <li><a href="#section-touchEnabled">touchEnabled</a></li>
  <li><a href="#section--cancelPendingTouches">-cancelPendingTouches</a></li>
  <li><a href="#section--init">-init</a></li>
  <li><a href="#section--initWithHitTester:">-initWithHitTester:</a></li>
</ul>

<h3>Overview</h3>

<p>Undocumented</p>


<section class="section task-group-section">
  <h3 id="section-touchEventDelegate">
      touchEventDelegate
  </h3>
  
  <p>Notified of processed touches such as pinches, pans, and taps</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/SDLTouchManagerDelegate.html">SDLTouchManagerDelegate</a></span><span class="o">&gt;</span>
    <span class="n">touchEventDelegate</span><span class="p">;</span></code></pre>

  
  
  
  
  <h3 id="section-touchEventHandler">
      touchEventHandler
  </h3>
  
  <p>@abstract
    Returns all OnTouchEvent notifications as SDLTouch and SDLTouchType objects.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span>
    <span class="n"><a href="../Type Definitions.html#/c:SDLTouchManager.h@T@SDLTouchEventHandler">SDLTouchEventHandler</a></span> <span class="n">touchEventHandler</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">touchEventHandler</span><span class="p">:</span> <span class="kt"><a href="../Type Definitions.html#/c:SDLTouchManager.h@T@SDLTouchEventHandler">SDLTouchEventHandler</a></span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-tapDistanceThreshold">
      tapDistanceThreshold
  </h3>
  
  <p>Distance between two taps on the screen, in the head unit&rsquo;s coordinate system, used for registering double-tap callbacks.</p>
<div class="aside aside-note">
    <p class="aside-title">Note</p>
    Defaults to 50 px.

</div>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">assign</span><span class="p">,</span> <span class="n">readwrite</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">CGFloat</span> <span class="n">tapDistanceThreshold</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">tapDistanceThreshold</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-tapTimeThreshold">
      tapTimeThreshold
  </h3>
  
  <p>@abstract
    Time (in seconds) between tap events to register a double-tap callback.
@remark
    Default is 0.4 seconds.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">assign</span><span class="p">,</span> <span class="n">readwrite</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">CGFloat</span> <span class="n">tapTimeThreshold</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">tapTimeThreshold</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-movementTimeThreshold">
      movementTimeThreshold
  </h3>
  
  <p>@abstract
    Time (in seconds) between movement events to register panning or pinching 
    callbacks.
@remark
    Default is 0.05 seconds.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">assign</span><span class="p">,</span> <span class="n">readwrite</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">CGFloat</span> <span class="n">movementTimeThreshold</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">movementTimeThreshold</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-touchEnabled">
      touchEnabled
  </h3>
  
  <p>@abstract
    Boolean denoting whether or not the touch manager should deliver touch event
    callbacks.
@remark
    Default is true.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">getter</span><span class="o">=</span><span class="n">isTouchEnabled</span><span class="p">,</span> <span class="n">assign</span><span class="p">,</span> <span class="n">readwrite</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span>
    <span class="n">BOOL</span> <span class="n">touchEnabled</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">isTouchEnabled</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section--cancelPendingTouches">
      -cancelPendingTouches
  </h3>
  
  <p>@abstract
    Cancels pending touch event timers that may be in progress.
@remark
    Currently only impacts the timer used to register single taps.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">cancelPendingTouches</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="kd">func</span> <span class="nf">cancelPendingTouches</span><span class="p">()</span></code></pre>

  
  
  
  <h3 id="section--init">
      -init
  </h3>
  
  <p>Undocumented</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="n">init</span> <span class="n">NS_UNAVAILABLE</span><span class="p">;</span></code></pre>

  
  
  
  
  <h3 id="section--initWithHitTester:">
      -initWithHitTester:
  </h3>
  
  <p>Initialize a touch manager with a hit tester if available</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithHitTester</span><span class="p">:</span>
    <span class="p">(</span><span class="n">nullable</span> <span class="n">id</span><span class="o">&lt;</span><span class="n">SDLHapticHitTester</span><span class="o">&gt;</span><span class="p">)</span><span class="nv">hitTester</span><span class="p">;</span></code></pre>

  
  
  
  <h4>Parameters</h4>
  <dl>
      <dt>hitTester</dt>
      <dd><p>The hit tester to be used to correlate a point with a view</p></dd>
  </dl>
  <div>
    <h4>Return Value</h4>
    <p>The initialized touch manager</p>
  </div>
  
</section>