init(voiceControlStates:)
Creates a voice control template with a list of voice control states.
Declaration
init(voiceControlStates: [CPVoiceControlState])Parameters
- voiceControlStates:
An array of voice control states associated with the template. You can provide up to five states. If you provide more, the template ignores any states after the first five in the array.
Return Value
A newly initialized voice control template.
Discussion
When presenting the voice control template for the first time, the template defaults to the first state in the voiceControlStates array. You can change the state after presenting the template by calling the activateVoiceControlState(withIdentifier:) method.