summaryrefslogtreecommitdiff
path: root/docs/Classes/SDLScreenManager.html
blob: 94d9b44e7db34e28a6aacdc9ed8a936e2e51f77a (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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
<h1>SDLScreenManager Class Reference</h1>

<h3>Section Contents</h3>

<ul>
  <li><a href="#section-textField1">textField1</a></li>
  <li><a href="#section-textField2">textField2</a></li>
  <li><a href="#section-textField3">textField3</a></li>
  <li><a href="#section-textField4">textField4</a></li>
  <li><a href="#section-mediaTrackTextField">mediaTrackTextField</a></li>
  <li><a href="#section-primaryGraphic">primaryGraphic</a></li>
  <li><a href="#section-secondaryGraphic">secondaryGraphic</a></li>
  <li><a href="#section-textAlignment">textAlignment</a></li>
  <li><a href="#section-textField1Type">textField1Type</a></li>
  <li><a href="#section-textField2Type">textField2Type</a></li>
  <li><a href="#section-textField3Type">textField3Type</a></li>
  <li><a href="#section-textField4Type">textField4Type</a></li>
  <li><a href="#section-title">title</a></li>
  <li><a href="#section-softButtonObjects">softButtonObjects</a></li>
  <li><a href="#section-menuConfiguration">menuConfiguration</a></li>
  <li><a href="#section-menu">menu</a></li>
  <li><a href="#section-dynamicMenuUpdatesMode">dynamicMenuUpdatesMode</a></li>
  <li><a href="#section-voiceCommands">voiceCommands</a></li>
  <li><a href="#section-keyboardConfiguration">keyboardConfiguration</a></li>
  <li><a href="#section-preloadedChoices">preloadedChoices</a></li>
  <li><a href="#section--initWithConnectionManager:fileManager:systemCapabilityManager:">-initWithConnectionManager:fileManager:systemCapabilityManager:</a></li>
  <li><a href="#section--initWithConnectionManager:fileManager:systemCapabilityManager:permissionManager:">-initWithConnectionManager:fileManager:systemCapabilityManager:permissionManager:</a></li>
  <li><a href="#section--startWithCompletionHandler:">-startWithCompletionHandler:</a></li>
  <li><a href="#section--stop">-stop</a></li>
  <li><a href="#section--beginUpdates">-beginUpdates</a></li>
  <li><a href="#section--endUpdates">-endUpdates</a></li>
  <li><a href="#section--endUpdatesWithCompletionHandler:">-endUpdatesWithCompletionHandler:</a></li>
  <li><a href="#section--changeLayout:withCompletionHandler:">-changeLayout:withCompletionHandler:</a></li>
  <li><a href="#section--softButtonObjectNamed:">-softButtonObjectNamed:</a></li>
  <li><a href="#section--subscribeButton:withUpdateHandler:">-subscribeButton:withUpdateHandler:</a></li>
  <li><a href="#section--subscribeButton:withObserver:selector:">-subscribeButton:withObserver:selector:</a></li>
  <li><a href="#section--unsubscribeButton:withObserver:withCompletionHandler:">-unsubscribeButton:withObserver:withCompletionHandler:</a></li>
  <li><a href="#section--preloadChoices:withCompletionHandler:">-preloadChoices:withCompletionHandler:</a></li>
  <li><a href="#section--deleteChoices:">-deleteChoices:</a></li>
  <li><a href="#section--presentChoiceSet:mode:">-presentChoiceSet:mode:</a></li>
  <li><a href="#section--presentSearchableChoiceSet:mode:withKeyboardDelegate:">-presentSearchableChoiceSet:mode:withKeyboardDelegate:</a></li>
  <li><a href="#section--presentKeyboardWithInitialText:delegate:">-presentKeyboardWithInitialText:delegate:</a></li>
  <li><a href="#section--dismissKeyboardWithCancelID:">-dismissKeyboardWithCancelID:</a></li>
  <li><a href="#section--openMenu">-openMenu</a></li>
  <li><a href="#section--openSubmenu:">-openSubmenu:</a></li>
  <li><a href="#section--presentAlert:withCompletionHandler:">-presentAlert:withCompletionHandler:</a></li>
</ul>

<h3>Overview</h3>

<p>The SDLScreenManager is a manager to control SDL UI features. Use the screen manager for setting up the UI of the template, creating a menu for your users, creating softbuttons, setting textfields, etc..</p>


<section class="section task-group-section">
  <h3 id="section-textField1">
      textField1
  </h3>
  
  <p>The top text field within a template layout. Pass an empty string <code>\@&quot;&quot;</code> to clear the text field.</p>

<p>If the system does not support a full 4 fields, this will automatically be concatenated and properly send the field available.</p>

<p>If 3 lines are available: [field1, field2, field3 - field 4]</p>

<p>If 2 lines are available: [field1 - field2, field3 - field4]</p>

<p>If 1 line is available: [field1 - field2 - field3 - field4]</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">textField1</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">textField1</span><span class="p">:</span> <span class="kt">String</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-textField2">
      textField2
  </h3>
  
  <p>The second text field within a template layout. Pass an empty string <code>\@&quot;&quot;</code> to clear the text field.</p>

<p>If the system does not support a full 4 fields, this will automatically be concatenated and properly send the field available.</p>

<p>If 3 lines are available: [field1, field2, field3 - field 4]</p>

<p>If 2 lines are available: [field1 - field2, field3 - field4]</p>

<p>If 1 line is available: [field1 - field2 - field3 - field4]</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">textField2</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">textField2</span><span class="p">:</span> <span class="kt">String</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-textField3">
      textField3
  </h3>
  
  <p>The third text field within a template layout. Pass an empty string <code>\@&quot;&quot;</code> to clear the text field.</p>

<p>If the system does not support a full 4 fields, this will automatically be concatenated and properly send the field available.</p>

<p>If 3 lines are available: [field1, field2, field3 - field 4]</p>

<p>If 2 lines are available: [field1 - field2, field3 - field4]</p>

<p>If 1 line is available: [field1 - field2 - field3 - field4]</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">textField3</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">textField3</span><span class="p">:</span> <span class="kt">String</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-textField4">
      textField4
  </h3>
  
  <p>The fourth text field within a template layout. Pass an empty string <code>\@&quot;&quot;</code> to clear the text field.</p>

<p>If the system does not support a full 4 fields, this will automatically be concatenated and properly send the field available.</p>

<p>If 3 lines are available: [field1, field2, field3 - field 4]</p>

<p>If 2 lines are available: [field1 - field2, field3 - field4]</p>

<p>If 1 line is available: [field1 - field2 - field3 - field4]</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">textField4</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">textField4</span><span class="p">:</span> <span class="kt">String</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-mediaTrackTextField">
      mediaTrackTextField
  </h3>
  
  <p>The media text field available within the media layout. Often less emphasized than textField(1-4)</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">mediaTrackTextField</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">mediaTrackTextField</span><span class="p">:</span> <span class="kt">String</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-primaryGraphic">
      primaryGraphic
  </h3>
  
  <p>The primary graphic within a template layout</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n"><a href="../Classes/SDLArtwork.html">SDLArtwork</a></span> <span class="o">*</span><span class="n">primaryGraphic</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">primaryGraphic</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLArtwork.html">SDLArtwork</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-secondaryGraphic">
      secondaryGraphic
  </h3>
  
  <p>A secondary graphic used in some template layouts</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n"><a href="../Classes/SDLArtwork.html">SDLArtwork</a></span> <span class="o">*</span><span class="n">secondaryGraphic</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">secondaryGraphic</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLArtwork.html">SDLArtwork</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-textAlignment">
      textAlignment
  </h3>
  
  <p>What alignment textField(1-4) should use</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">)</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLTextAlignment.h@T@SDLTextAlignment">SDLTextAlignment</a></span> <span class="n">_Nonnull</span> <span class="n">textAlignment</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">textAlignment</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLTextAlignment.h@T@SDLTextAlignment">SDLTextAlignment</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-textField1Type">
      textField1Type
  </h3>
  
  <p>The type of data textField1 describes</p>

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

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">textField1Type</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLMetadataType.h@T@SDLMetadataType">SDLMetadataType</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-textField2Type">
      textField2Type
  </h3>
  
  <p>The type of data textField2 describes</p>

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

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">textField2Type</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLMetadataType.h@T@SDLMetadataType">SDLMetadataType</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-textField3Type">
      textField3Type
  </h3>
  
  <p>The type of data textField3 describes</p>

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

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">textField3Type</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLMetadataType.h@T@SDLMetadataType">SDLMetadataType</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-textField4Type">
      textField4Type
  </h3>
  
  <p>The type of data textField4 describes</p>

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

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">textField4Type</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLMetadataType.h@T@SDLMetadataType">SDLMetadataType</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-title">
      title
  </h3>
  
  <p>The title of the current template layout.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">title</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">title</span><span class="p">:</span> <span class="kt">String</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-softButtonObjects">
      softButtonObjects
  </h3>
  
  <p>The current list of soft buttons within a template layout. Set this array to change the displayed soft buttons.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">)</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLSoftButtonObject.html">SDLSoftButtonObject</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">softButtonObjects</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">softButtonObjects</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SDLSoftButtonObject.html">SDLSoftButtonObject</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-menuConfiguration">
      menuConfiguration
  </h3>
  
  <p>Configures the layout of the menu and sub-menus. If set after a menu already exists, the existing main menu layout will be updated.</p>

<p>If set menu layouts don&rsquo;t match available menu layouts in WindowCapability, an error log will be emitted and the layout will not be set.</p>

<p>Setting this parameter will send a message to the remote system. This value will be set immediately, but if that message is rejected, the original value will be re-set and an error log will be emitted.</p>

<p>This only works on head units supporting RPC spec version 6.0 and newer. If the connected head unit does not support this feature, a warning log will be emitted and nothing will be set.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">strong</span><span class="p">)</span> <span class="n"><a href="../Classes/SDLMenuConfiguration.html">SDLMenuConfiguration</a></span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">menuConfiguration</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">menuConfiguration</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLMenuConfiguration.html">SDLMenuConfiguration</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-menu">
      menu
  </h3>
  
  <p>The current list of menu cells displayed in the app&rsquo;s menu.</p>

<p>WARNING: If two or more cells in this array are duplicates – they contain all of the same data – the menu will not be set. Each list of <code>subCells</code> and the main menu are compared separately, which means you can have duplicate cells between the main menu and a sub cell list without a conflict occurring.</p>

<p>WARNING: If two or more cells contain the same <code><a href="../Classes/SDLScreenManager.html#/c:objc(cs)SDLScreenManager(py)title">title</a></code> but are otherwise distinctive, unique identifiers will be appended in the style (2), (3), (4), etc. to those cells&rsquo; <code><a href="../Classes/SDLScreenManager.html#/c:objc(cs)SDLScreenManager(py)title">title</a></code>. The same rules apply to duplicate titles as apply to complete duplicates above: the titles can be duplicates between different array lists without a conflict.</p>

<p>WARNING: If any two cells contain the same voice command string in their <code><a href="../Classes/SDLScreenManager.html#/c:objc(cs)SDLScreenManager(py)voiceCommands">voiceCommands</a></code> list, the menu will not be set. Note that unlike the two warnings above, these lists <em>are not</em> checked separately. If you have the same voice command in a cell of the main menu and a sub cell, it will not be set.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">)</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLMenuCell.html">SDLMenuCell</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">menu</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">menu</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SDLMenuCell.html">SDLMenuCell</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-dynamicMenuUpdatesMode">
      dynamicMenuUpdatesMode
  </h3>
  
  <p>Change the mode of the dynamic menu updater to be enabled, disabled, or enabled on known compatible head units.</p>

<p>The current status for dynamic menu updates. A dynamic menu update allows for smarter building of menu changes. If this status is set to <code>SDLDynamicMenuUpdatesModeForceOn</code>, menu updates will only create add commands for new items and delete commands for items no longer appearing in the menu. This helps reduce possible RPCs failures as there will be significantly less commands sent to the HMI.</p>

<p>If set to <code>SDLDynamicMenuUpdatesModeForceOff</code>, menu updates will work the legacy way. This means when a new menu is set the entire old menu is deleted and add commands are created for every item regardless if the item appears in both the old and new menu. This method is RPCs heavy and may cause some failures when creating and updating large menus.</p>

<p>We recommend using either <code>SDLDynamicMenuUpdatesModeOnWithCompatibility</code> or <code>SDLDynamicMenuUpdatesModeForceOn</code>. <code>SDLDynamicMenuUpdatesModeOnWithCompatibility</code> turns dynamic updates off for head units that we know have poor compatibility with dynamic updates (e.g. they have bugs that cause menu items to not be placed correctly).</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">)</span> <span class="n"><a href="../Enums/SDLDynamicMenuUpdatesMode.html">SDLDynamicMenuUpdatesMode</a></span> <span class="n">dynamicMenuUpdatesMode</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">dynamicMenuUpdatesMode</span><span class="p">:</span> <span class="kt"><a href="../Enums/SDLDynamicMenuUpdatesMode.html">SDLDynamicMenuUpdatesMode</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-voiceCommands">
      voiceCommands
  </h3>
  
  <p>The current list of voice commands available for the user to speak and be recognized by the IVI&rsquo;s voice recognition engine.</p>
<div class="aside aside-warning">
    <p class="aside-title">Warning</p>
    May not be an empty string

</div>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">)</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLVoiceCommand.html">SDLVoiceCommand</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">voiceCommands</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">voiceCommands</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SDLVoiceCommand.html">SDLVoiceCommand</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-keyboardConfiguration">
      keyboardConfiguration
  </h3>
  
  <p>The default keyboard configuration, this can be additionally customized by each SDLKeyboardDelegate.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">null_resettable</span><span class="p">)</span> <span class="n"><a href="../Classes/SDLKeyboardProperties.html">SDLKeyboardProperties</a></span> <span class="o">*</span><span class="n">keyboardConfiguration</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">keyboardConfiguration</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLKeyboardProperties.html">SDLKeyboardProperties</a></span><span class="o">!</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-preloadedChoices">
      preloadedChoices
  </h3>
  
  <p>Cells will be hashed by their text, image names, and VR command text. When assembling an SDLChoiceSet, you can pull objects from here, or recreate them. The preloaded versions will be used so long as their text, image names, and VR commands are the same.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">NSSet</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLChoiceCell.html">SDLChoiceCell</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">preloadedChoices</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">preloadedChoices</span><span class="p">:</span> <span class="kt">Set</span><span class="o">&lt;</span><span class="kt">AnyHashable</span><span class="o">&gt;</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section--initWithConnectionManager:fileManager:systemCapabilityManager:">
      -initWithConnectionManager:fileManager:systemCapabilityManager:
  </h3>
  
  <p>Initialize a screen manager</p>
<div class="aside aside-warning">
    <p class="aside-title">Warning</p>
    <p>For internal use. An exception will be thrown if used.</p>

</div>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><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">initWithConnectionManager</span><span class="p">:</span>
        <span class="p">(</span><span class="n">nonnull</span> <span class="n">id</span><span class="o">&lt;</span><span class="n">SDLConnectionManagerType</span><span class="o">&gt;</span><span class="p">)</span><span class="nv">connectionManager</span>
                  <span class="nf">fileManager</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLFileManager.html">SDLFileManager</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">fileManager</span>
      <span class="nf">systemCapabilityManager</span><span class="p">:</span>
          <span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLSystemCapabilityManager.html">SDLSystemCapabilityManager</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">systemCapabilityManager</span><span class="p">;</span></code></pre>

  
  
  
  <h4>Parameters</h4>
  <dl>
      <dt>connectionManager</dt>
      <dd><p>The connection manager used to send RPCs</p></dd>
      <dt>fileManager</dt>
      <dd><p>The file manager used to upload files</p></dd>
      <dt>systemCapabilityManager</dt>
      <dd><p>The system capability manager object for reading window capabilities</p></dd>
  </dl>
  <div>
    <h4>Return Value</h4>
    <p>The screen manager</p>
  </div>
  
  <h3 id="section--initWithConnectionManager:fileManager:systemCapabilityManager:permissionManager:">
      -initWithConnectionManager:fileManager:systemCapabilityManager:permissionManager:
  </h3>
  
  <p>Initialize a screen manager</p>
<div class="aside aside-warning">
    <p class="aside-title">Warning</p>
    <p>For internal use</p>

</div>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><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">initWithConnectionManager</span><span class="p">:</span>
        <span class="p">(</span><span class="n">nonnull</span> <span class="n">id</span><span class="o">&lt;</span><span class="n">SDLConnectionManagerType</span><span class="o">&gt;</span><span class="p">)</span><span class="nv">connectionManager</span>
                  <span class="nf">fileManager</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLFileManager.html">SDLFileManager</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">fileManager</span>
      <span class="nf">systemCapabilityManager</span><span class="p">:</span>
          <span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLSystemCapabilityManager.html">SDLSystemCapabilityManager</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">systemCapabilityManager</span>
            <span class="nf">permissionManager</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLPermissionManager.html">SDLPermissionManager</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">permissionManager</span><span class="p">;</span></code></pre>

  
  
  
  <h4>Parameters</h4>
  <dl>
      <dt>connectionManager</dt>
      <dd><p>The connection manager used to send RPCs</p></dd>
      <dt>fileManager</dt>
      <dd><p>The file manager used to upload files</p></dd>
      <dt>systemCapabilityManager</dt>
      <dd><p>The system capability manager object for reading window capabilities</p></dd>
      <dt>permissionManager</dt>
      <dd><p>The permission manager object for checking RPC permissions</p></dd>
  </dl>
  <div>
    <h4>Return Value</h4>
    <p>The screen manager</p>
  </div>
  
  <h3 id="section--startWithCompletionHandler:">
      -startWithCompletionHandler:
  </h3>
  
  <p>Starts the manager and all sub-managers</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">startWithCompletionHandler</span><span class="p">:</span>
    <span class="p">(</span><span class="n">nonnull</span> <span class="kt">void</span> <span class="p">(</span><span class="o">^</span><span class="p">)(</span><span class="n">NSError</span> <span class="o">*</span><span class="n">_Nullable</span><span class="p">))</span><span class="nv">handler</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">start</span><span class="p">()</span> <span class="n">async</span> <span class="k">throws</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>handler</dt>
      <dd><p>The handler called when setup is complete</p></dd>
  </dl>
  
  <h3 id="section--stop">
      -stop
  </h3>
  
  <p>Stops the manager.</p>
<div class="aside aside-warning">
    <p class="aside-title">Warning</p>
    For internal use

</div>

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

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

  
  
  
  <h3 id="section--beginUpdates">
      -beginUpdates
  </h3>
  
  <p>Delays all screen updates until endUpdatesWithCompletionHandler: is called.</p>

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

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

  
  
  
  <h3 id="section--endUpdates">
      -endUpdates
  </h3>
  
  <p>Pairs with <code>beginUpdates:</code> to batch text, graphic, and layout changes into a single update with a callback when the update is complete.</p>

<p>Update text fields with new text set into the text field properties, updates the primary and secondary images with new image(s) if new one(s) been set, and updates the template if one was changed using <code>changeLayout:withCompletionHandler:</code>.</p>

<p>NOTE: The handler in <code>changeLayout:withCompletionHandler:</code> will not be called if the update is batched into this update.</p>

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

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

  
  
  
  <h3 id="section--endUpdatesWithCompletionHandler:">
      -endUpdatesWithCompletionHandler:
  </h3>
  
  <p>Pairs with <code>beginUpdates:</code> to batch text, graphic, and layout changes into a single update with a callback when the update is complete.</p>

<p>Update text fields with new text set into the text field properties, updates the primary and secondary images with new image(s) if new one(s) been set, and updates the template if one was changed using <code>changeLayout:withCompletionHandler:</code>.</p>

<p>NOTE: The handler in <code>changeLayout:withCompletionHandler:</code> will not be called if the update is batched into this update.</p>

<p>NOTE: If this update returns an error, it may have been superseded by another update. This means that it was cancelled while in-progress because another update was requested, whether batched or not. Check for error domain <code><a href="../Constants.html#/c:@SDLErrorDomainTextAndGraphicManager">SDLErrorDomainTextAndGraphicManager</a></code> and code <code>SDLTextAndGraphicManagerErrorPendingUpdateSuperseded</code> to determine if your update was superseded. Any other error should represent a rejection of your data to be presented by the head unit. Note that if your update is superseded, it&rsquo;s possible that the update will succeed or fail later. If you have set a handler for your update which superseded this update, the error or success will be represented there.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">endUpdatesWithCompletionHandler</span><span class="p">:</span>
    <span class="p">(</span><span class="n">nullable</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLScreenManager.h@T@SDLScreenManagerUpdateCompletionHandler">SDLScreenManagerUpdateCompletionHandler</a></span><span class="p">)</span><span class="nv">handler</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">endUpdates</span><span class="p">()</span> <span class="n">async</span> <span class="k">throws</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>handler</dt>
      <dd><p>A handler run when the fields have finished updating, with an error if the update failed. This handler may be called multiple times when the text update is sent and the image update is sent.</p></dd>
  </dl>
  
  <h3 id="section--changeLayout:withCompletionHandler:">
      -changeLayout:withCompletionHandler:
  </h3>
  
  <p>Change the current layout to a new layout and optionally update the layout&rsquo;s night and day color schemes. The values set for the text, graphics, buttons and template title persist between layout changes. To update the text, graphics, buttons and template title at the same time as the template, batch all the updates between <code>beginUpdates</code> and <code>endUpdates</code>. If the layout update fails while batching, then the updated text, graphics, buttons or template title will also not be updated.</p>

<p>If you are connected on a &lt; v6.0 connection and batching the update, the layout will be updated, then the text and graphics will be updated. If you are connected on a &gt;= v6.0 connection, the layout will be updated at the same time that the text and graphics are updated.</p>

<p>If this update is batched between <code>beginUpdates</code> and <code>endUpdatesWithCompletionHandler:</code>, the completion handler here will not be called. Use the completion handler on <code>endUpdatesWithCompletionHandler:</code></p>

<p>NOTE: If this update returns an error, it may have been superseded by another update. This means that it was cancelled while in-progress because another update was requested, whether batched or not. Check for error domain <code><a href="../Constants.html#/c:@SDLErrorDomainTextAndGraphicManager">SDLErrorDomainTextAndGraphicManager</a></code> and code <code>SDLTextAndGraphicManagerErrorPendingUpdateSuperseded</code> to determine if your update was superseded. Any other error should represent a rejection of your data to be presented by the head unit. Note that if your update is superseded, it&rsquo;s possible that the update will succeed or fail later. If you have set a handler for your update which superseded this update, the error or success will be represented there.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">changeLayout</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLTemplateConfiguration.html">SDLTemplateConfiguration</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">templateConfiguration</span>
    <span class="nf">withCompletionHandler</span><span class="p">:</span>
        <span class="p">(</span><span class="n">nullable</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLScreenManager.h@T@SDLScreenManagerUpdateCompletionHandler">SDLScreenManagerUpdateCompletionHandler</a></span><span class="p">)</span><span class="nv">handler</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">changeLayout</span><span class="p">(</span><span class="n">_</span> <span class="nv">templateConfiguration</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLTemplateConfiguration.html">SDLTemplateConfiguration</a></span><span class="p">)</span> <span class="n">async</span> <span class="k">throws</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>templateConfiguration</dt>
      <dd><p>The new configuration of the template, including the layout and color scheme.</p></dd>
      <dt>handler</dt>
      <dd><p>A handler that will be called when the layout change finished.</p></dd>
  </dl>
  
  <h3 id="section--softButtonObjectNamed:">
      -softButtonObjectNamed:
  </h3>
  
  <p>Retrieve a SoftButtonObject based on its name.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nullable</span> <span class="n"><a href="../Classes/SDLSoftButtonObject.html">SDLSoftButtonObject</a></span> <span class="o">*</span><span class="p">)</span><span class="nf">softButtonObjectNamed</span><span class="p">:</span>
    <span class="p">(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">name</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">softButtonObjectNamed</span><span class="p">(</span><span class="n">_</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Classes/SDLSoftButtonObject.html">SDLSoftButtonObject</a></span><span class="p">?</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>name</dt>
      <dd><p>The name of the button</p></dd>
  </dl>
  
  <h3 id="section--subscribeButton:withUpdateHandler:">
      -subscribeButton:withUpdateHandler:
  </h3>
  
  <p>Subscribes to a subscribe button. The update handler will be called when the button has been selected. If there is an error subscribing to the subscribe button it will be returned in the <code>error</code> parameter of the updateHandler.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">id</span><span class="o">&lt;</span><span class="n">NSObject</span><span class="o">&gt;</span><span class="p">)</span><span class="nf">subscribeButton</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLButtonName.h@T@SDLButtonName">SDLButtonName</a></span><span class="p">)</span><span class="nv">buttonName</span>
                      <span class="nf">withUpdateHandler</span><span class="p">:</span>
                          <span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLScreenManager.h@T@SDLSubscribeButtonHandler">SDLSubscribeButtonHandler</a></span><span class="p">)</span><span class="nv">updateHandler</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">subscribeButton</span><span class="p">(</span><span class="n">_</span> <span class="nv">buttonName</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLButtonName.h@T@SDLButtonName">SDLButtonName</a></span><span class="p">,</span> <span class="n">withUpdateHandler</span> <span class="nv">updateHandler</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLScreenManager.h@T@SDLSubscribeButtonHandler">SDLSubscribeButtonHandler</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">NSObjectProtocol</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>buttonName</dt>
      <dd><p>The name of the hard button to subscribe to</p></dd>
      <dt>updateHandler</dt>
      <dd><p>The block run when the subscribe button is selected</p></dd>
  </dl>
  <div>
    <h4>Return Value</h4>
    <p>An object that can be used to unsubscribe the block using <code>unsubscribeButtonWithObserver:withCompletionHandler:</code>.</p>
  </div>
  
  <h3 id="section--subscribeButton:withObserver:selector:">
      -subscribeButton:withObserver:selector:
  </h3>
  
  <p>Subscribes to a subscribe button. The selector will be called when the button has been selected. If there is an error subscribing to the subscribe button it will be returned in the <code>error</code> parameter of the selector.</p>

<p>The selector supports the following parameters:</p>

<ol>
<li><p>A selector with no parameters. The observer will be notified when a button press occurs (it will not know if a short or long press has occurred).</p></li>
<li><p>A selector with one parameter: (SDLButtonName). The observer will be notified when a button press occurs (both a short and long press will trigger the selector, but it will not be able to distinguish between them). It will not be notified of button events.</p></li>
<li><p>A selector with two parameters: (SDLButtonName, NSError). The observer will be notified when a button press occurs (both a short and long press will trigger the selector, but it will not be able to distinguish between them). It will not be notified of button events.</p></li>
<li><p>A selector with three parameters: (SDLButtonName, NSError, SDLOnButtonPress). The observer will be notified when a long or short button press occurs (and can distinguish between a short or long press), but will not be notified of individual button events.</p></li>
<li><p>A selector with four parameters: (SDLButtonName, NSError, SDLOnButtonPress, SDLOnButtonEvent). The observer will be notified when any button press or any button event occurs (and can distinguish between them).</p></li>
</ol>

<p>To unsubscribe from the hard button, call <code>unsubscribeButton:withObserver:withCompletionHandler:</code>.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">subscribeButton</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLButtonName.h@T@SDLButtonName">SDLButtonName</a></span><span class="p">)</span><span class="nv">buttonName</span>
           <span class="nf">withObserver</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">id</span><span class="o">&lt;</span><span class="n">NSObject</span><span class="o">&gt;</span><span class="p">)</span><span class="nv">observer</span>
               <span class="nf">selector</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">SEL</span><span class="p">)</span><span class="nv">selector</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">subscribeButton</span><span class="p">(</span><span class="n">_</span> <span class="nv">buttonName</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLButtonName.h@T@SDLButtonName">SDLButtonName</a></span><span class="p">,</span> <span class="n">withObserver</span> <span class="nv">observer</span><span class="p">:</span> <span class="kt">NSObjectProtocol</span><span class="p">,</span> <span class="nv">selector</span><span class="p">:</span> <span class="kt">Selector</span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>buttonName</dt>
      <dd><p>The name of the hard button to subscribe to</p></dd>
      <dt>observer</dt>
      <dd><p>The object that will have <code>selector</code> called whenever the button has been selected</p></dd>
      <dt>selector</dt>
      <dd><p>The selector on <code>observer</code> that will be called whenever the button has been selected</p></dd>
  </dl>
  
  <h3 id="section--unsubscribeButton:withObserver:withCompletionHandler:">
      -unsubscribeButton:withObserver:withCompletionHandler:
  </h3>
  
  <p>Unsubscribes to a subscribe button. Please note that if a subscribe button has multiple subscribers the observer will no longer get notifications, however, the app will still be subscribed to the hard button until the last subscriber is removed.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">unsubscribeButton</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLButtonName.h@T@SDLButtonName">SDLButtonName</a></span><span class="p">)</span><span class="nv">buttonName</span>
             <span class="nf">withObserver</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">id</span><span class="o">&lt;</span><span class="n">NSObject</span><span class="o">&gt;</span><span class="p">)</span><span class="nv">observer</span>
    <span class="nf">withCompletionHandler</span><span class="p">:</span>
        <span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLScreenManager.h@T@SDLScreenManagerUpdateCompletionHandler">SDLScreenManagerUpdateCompletionHandler</a></span><span class="p">)</span><span class="nv">completionHandler</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">unsubscribeButton</span><span class="p">(</span><span class="n">_</span> <span class="nv">buttonName</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLButtonName.h@T@SDLButtonName">SDLButtonName</a></span><span class="p">,</span> <span class="n">withObserver</span> <span class="nv">observer</span><span class="p">:</span> <span class="kt">NSObjectProtocol</span><span class="p">)</span> <span class="n">async</span> <span class="k">throws</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>buttonName</dt>
      <dd><p>The name of the hard button to subscribe to</p></dd>
      <dt>observer</dt>
      <dd><p>The object that will be unsubscribed. If a block was subscribed, the return value should be passed. If a selector was subscribed, the observer object should be passed</p></dd>
      <dt>completionHandler</dt>
      <dd><p>A handler called when the observer has been unsubscribed to the hard button</p></dd>
  </dl>
  
  <h3 id="section--preloadChoices:withCompletionHandler:">
      -preloadChoices:withCompletionHandler:
  </h3>
  
  <p>Preload cells to the head unit. This will <em>greatly</em> reduce the time taken to present a choice set. Any already matching a choice already on the head unit will be ignored. You <em>do not</em> need to wait until the completion handler is called to present a choice set containing choices being loaded. The choice set will wait until the preload completes and then immediately present.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">preloadChoices</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLChoiceCell.html">SDLChoiceCell</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">choices</span>
    <span class="nf">withCompletionHandler</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLScreenManager.h@T@SDLPreloadChoiceCompletionHandler">SDLPreloadChoiceCompletionHandler</a></span><span class="p">)</span><span class="nv">handler</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">preloadChoices</span><span class="p">(</span><span class="n">_</span> <span class="nv">choices</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SDLChoiceCell.html">SDLChoiceCell</a></span><span class="p">])</span> <span class="n">async</span> <span class="k">throws</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>choices</dt>
      <dd><p>The choices to be preloaded.</p></dd>
      <dt>handler</dt>
      <dd><p>The handler to be called when complete.</p></dd>
  </dl>
  
  <h3 id="section--deleteChoices:">
      -deleteChoices:
  </h3>
  
  <p>Delete loaded cells from the head unit. If the cells don&rsquo;t exist on the head unit they will be ignored.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">deleteChoices</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLChoiceCell.html">SDLChoiceCell</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">choices</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">deleteChoices</span><span class="p">(</span><span class="n">_</span> <span class="nv">choices</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SDLChoiceCell.html">SDLChoiceCell</a></span><span class="p">])</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>choices</dt>
      <dd><p>The choices to be deleted. These will be matched via a hash of the text, image name(s), and VR commands.</p></dd>
  </dl>
  
  <h3 id="section--presentChoiceSet:mode:">
      -presentChoiceSet:mode:
  </h3>
  
  <p>Present a choice set on the head unit with a certain interaction mode. You should present in VR only if the user reached this choice set by using their voice, in Manual only if the user used touch to reach this choice set. Use Both if you&rsquo;re lazy&hellip;for real though, it&rsquo;s kind of confusing to the user and isn&rsquo;t recommended.</p>

<p>If the cells in the set are not already preloaded, they will be preloaded before the presentation occurs; this could take a while depending on the contents of the cells.</p>

<p>If the cells have voice commands and images attached, this could take upwards of 10 seconds. If there are no cells on the set, this will fail, calling <code>choiceSet:didReceiveError:</code> on the choice set delegate.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">presentChoiceSet</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLChoiceSet.html">SDLChoiceSet</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">choiceSet</span>
                    <span class="nf">mode</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLInteractionMode.h@T@SDLInteractionMode">SDLInteractionMode</a></span><span class="p">)</span><span class="nv">mode</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">present</span><span class="p">(</span><span class="n">_</span> <span class="nv">choiceSet</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLChoiceSet.html">SDLChoiceSet</a></span><span class="p">,</span> <span class="nv">mode</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLInteractionMode.h@T@SDLInteractionMode">SDLInteractionMode</a></span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>choiceSet</dt>
      <dd><p>The set to be displayed</p></dd>
      <dt>mode</dt>
      <dd><p>If the set should be presented for the user to interact via voice, touch, or both</p></dd>
  </dl>
  
  <h3 id="section--presentSearchableChoiceSet:mode:withKeyboardDelegate:">
      -presentSearchableChoiceSet:mode:withKeyboardDelegate:
  </h3>
  
  <p>Present a choice set on the head unit with a certain interaction mode. You should present in VR only if the user reached this choice set by using their voice, in Manual only if the user used touch to reach this choice set. Use Both if you&rsquo;re lazy&hellip;for real though, it&rsquo;s kind of confusing to the user and isn&rsquo;t recommended.</p>

<p>This presents the choice set as searchable when in a touch interaction. The user, when not in a distracted state, will have a keyboard available for searching this set. The user&rsquo;s input in the keyboard will be available in the SDLKeyboardDelegate.</p>

<p>If the cells in the set are not already preloaded, they will be preloaded before the presentation occurs; this could take a while depending on the contents of the cells.</p>

<p>If the cells have voice commands and images attached, this could take upwards of 10 seconds. If there are no cells on the set, this will fail, calling <code>choiceSet:didReceiveError:</code> on the choice set delegate.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">presentSearchableChoiceSet</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLChoiceSet.html">SDLChoiceSet</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">choiceSet</span>
                              <span class="nf">mode</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLInteractionMode.h@T@SDLInteractionMode">SDLInteractionMode</a></span><span class="p">)</span><span class="nv">mode</span>
              <span class="nf">withKeyboardDelegate</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/SDLKeyboardDelegate.html">SDLKeyboardDelegate</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">delegate</span><span class="p">;</span></code></pre>

  
  
  
  <h4>Parameters</h4>
  <dl>
      <dt>choiceSet</dt>
      <dd><p>The set to be displayed</p></dd>
      <dt>mode</dt>
      <dd><p>If the set should be presented for the user to interact via voice, touch, or both</p></dd>
      <dt>delegate</dt>
      <dd><p>The keyboard delegate called when the user interacts with the search field of the choice set</p></dd>
  </dl>
  
  <h3 id="section--presentKeyboardWithInitialText:delegate:">
      -presentKeyboardWithInitialText:delegate:
  </h3>
  
  <p>Present a keyboard-only interface to the user and receive input. The user will be able to input text in the keyboard when in a non-driver distraction situation.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nullable</span> <span class="n">NSNumber</span><span class="o">&lt;</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLInt">SDLInt</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span>
    <span class="nf">presentKeyboardWithInitialText</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">initialText</span>
                          <span class="nf">delegate</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/SDLKeyboardDelegate.html">SDLKeyboardDelegate</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">delegate</span><span class="p">;</span></code></pre>

  
  
  
  <h4>Parameters</h4>
  <dl>
      <dt>initialText</dt>
      <dd><p>The initial text within the keyboard input field. It will disappear once the user selects the field in order to enter text</p></dd>
      <dt>delegate</dt>
      <dd><p>The keyboard delegate called when the user interacts with the keyboard</p></dd>
  </dl>
  <div>
    <h4>Return Value</h4>
    <p>A unique cancelID that can be used to cancel this keyboard</p>
  </div>
  
  <h3 id="section--dismissKeyboardWithCancelID:">
      -dismissKeyboardWithCancelID:
  </h3>
  
  <p>Cancels the keyboard-only interface if it is currently showing. If the keyboard has not yet been sent to Core, it will not be sent.</p>

<p>This will only dismiss an already presented keyboard if connected to head units running SDL 6.0+.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">dismissKeyboardWithCancelID</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSNumber</span><span class="o">&lt;</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLInt">SDLInt</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">cancelID</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">dismissKeyboard</span><span class="p">(</span><span class="n">withCancelID</span> <span class="nv">cancelID</span><span class="p">:</span> <span class="kt">NSNumber</span> <span class="o">&amp;</span> <span class="kt"><a href="../Protocols.html#/c:objc(pl)SDLInt">SDLInt</a></span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>cancelID</dt>
      <dd><p>The unique ID assigned to the keyboard, passed as the return value from <code>presentKeyboardWithInitialText:keyboardDelegate:</code></p></dd>
  </dl>
  
  <h3 id="section--openMenu">
      -openMenu
  </h3>
  
  <p>Present the top-level of your application menu. This method should be called if the menu needs to be opened programmatically because the built in menu button is hidden.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">BOOL</span><span class="p">)</span><span class="n">openMenu</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">openMenu</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>

  
  
  
  <h3 id="section--openSubmenu:">
      -openSubmenu:
  </h3>
  
  <p>Present the application menu. This method should be called if the menu needs to be opened programmatically because the built in menu button is hidden. You must update the menu with the proper cells before calling this method. This RPC will fail if the cell does not contain a sub menu, or is not in the menu array.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">BOOL</span><span class="p">)</span><span class="nf">openSubmenu</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLMenuCell.html">SDLMenuCell</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">cell</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">openSubmenu</span><span class="p">(</span><span class="n">_</span> <span class="nv">cell</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLMenuCell.html">SDLMenuCell</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>cell</dt>
      <dd><p>The submenu cell that should be opened as a sub menu, with its sub cells as the options.</p></dd>
  </dl>
  
  <h3 id="section--presentAlert:withCompletionHandler:">
      -presentAlert:withCompletionHandler:
  </h3>
  
  <p>Present the alert on the screen. To replace a currently presenting alert with a new alert, you must first call <code>cancel</code> on the currently presenting alert before sending the new alert. Otherwise the newest alert will only be presented when the module dismisses the currently presented alert (either due to the timeout or the user selecting a button on the alert). Please note that cancelling a currently presented alert will only work on modules supporting RPC Spec v.5.0+.</p>

<p>If the alert contains an audio indication with a file that needs to be uploaded, it will be uploaded before presenting the alert. If the alert contains soft buttons with images, they will be uploaded before presenting the alert. If the alert contains an icon, that will be uploaded before presenting the alert.</p>

<p>The handler will be called when the alert either dismisses from the screen or it has failed to present. If the error value in the handler is present, then the alert failed to appear or was aborted, if not, then the alert dismissed without error. The <code>userInfo</code> object on the error contains an <code>error</code> key with more information about the error. If the alert failed to present, the <code>userInfo</code> object will contain a <code>tryAgainTime</code> key with information on how long to wait before trying to send another alert. The value for <code>tryAgainTime</code> may be <code>nil</code> if the module did not return a value in its response.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">presentAlert</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLAlertView.html">SDLAlertView</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">alert</span>
    <span class="nf">withCompletionHandler</span><span class="p">:</span>
        <span class="p">(</span><span class="n">nullable</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLScreenManager.h@T@SDLScreenManagerUpdateCompletionHandler">SDLScreenManagerUpdateCompletionHandler</a></span><span class="p">)</span><span class="nv">handler</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">presentAlert</span><span class="p">(</span><span class="n">_</span> <span class="nv">alert</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLAlertView.html">SDLAlertView</a></span><span class="p">)</span> <span class="n">async</span> <span class="k">throws</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>alert</dt>
      <dd><p>Alert to be presented</p></dd>
      <dt>handler</dt>
      <dd><p>The handler to be called when the alert either dismisses from the screen or it has failed to present.</p></dd>
  </dl>
  
</section>