Pregunta

I want to create a statement that says

if (segmentTitle.selectedSegmentIndex == NOT SELECTED) {
    segmentTitle.selectedSegmentIndex == 0;
}

What is NOT SELECTED in C code?

¿Fue útil?

Solución

If you read the docs for UISegmentedControl you will find the answer:

if (segmentTitle.selectedSegmentIndex == UISegmentedControlNoSegment) {
    segmentTitle.selectedSegmentIndex = 0;
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top