HIG
Lab
HIG Playground
Home
GitHub
🇺🇸 EN
HIG Lab
→
HIG Playground
→ Toggles
Toggles
iOS Toggle(Switch) 컨트롤의 on/off 상태 전환과 색상 커스터마이징을 체험해보세요.
9:41
●●●●
WiFi
🔋
Settings
Connectivity
✈
Airplane Mode
📶
Wi-Fi
📡
Bluetooth
Notifications
🔔
Allow Notifications
🔊
Sounds
📳
Badges
Privacy
📍
Location Services
📷
Camera Access
⚠️ HIG 위반: 토글 사용이 부적절합니다
📚 HIG Guidelines — 직접 체험하기
✓ Do — 올바른 예시
✗ Don't — 나쁜 예시
✓ 이렇게 하세요
Use toggles for binary on/off states
Label clearly what the toggle controls
Use green for the default on-state color
Place toggles on the trailing edge of list rows
✗ 이렇게 하지 마세요
Don't use a toggle when a button is more appropriate
Don't change toggle labels based on state
Don't use toggles for actions (only states)
Don't group more than 7-8 toggles together
👆 iPhone 미리보기에서 나쁜 패턴을 직접 확인해보세요
Show Disabled State
All On
All Off
LIVE HIG CHECK
SwiftUI Code
Copy
@State private var
isOn =
true
Toggle
(
"Wi-Fi"
, isOn:
$isOn
) .
tint
(
.green
)