Smart Code Components » iOS Segmented Control » B – Selected Index

B – Selected Index

First, our component needs the most basic functionality: We should at least be able to select a segment by tapping it. Let’s make this thing interactive.The index stateTap handler functionDisplaying the selected segmentThe index stateI added an index state variable (and a setIndex() function to change it) with an initial value of 0:export default function iOS_Segmented_Control_B(props) { […]
To access this page, you must purchase The Framer book.