[App Architecture] Modality
Modality 문서 보러가기
Modal이란 현재 사용자가 보고있는 화면 위에 다른 화면을 띄어 시선을 끄는 방식을 말한다. Modal을 종료하기 위해서는 명시적인 조치가 필요하다.
다양한 system-defined modal experiences이 가능하게 하기 위해서, iOS는 alerts, activity views, share sheets, action sheets을 제공한다. app에 custom modal content를 표시하기 위해서, 아래 presentation styles 중 하나를 사용할 수 있다..
- Automatic. Uses the default presentation style, typically a sheet.
- Fullscreen. Covers the previous view, and requires a button for dismissal.
- Popover. Presents a popover in a horizontally regular environment and a sheet in compact environments.
- Page sheet and form sheet. Partially covers the previous view; for guidance, see Sheets.
- Current context. Covers a particular previous view.
- Custom. Uses custom animation to present content in a custom container.
UIModalPresentationStyle 개발자 가이드라인을 참고한다.
Use modality when it makes sense.
Modal은 선택을 하거나 현재 작업에서 다른 작업을 수행할 때, 사용자의 이목을 집중시키는 것이 중요할 때만 사용하도록 한다.
Reserve alerts for delivering essential — and ideally actionable — information.
필수적이고 이상적인 상황에서 경고를 준다. 일반적으로 문제가 발생했을 때 경고가 나타난다. 경고는 현재 작업을 중단하고 해제하려면 탭해야 하기 때문에 사람들이 경고가 정당하다고 느끼는 것은 중요하다. Alerts 가이드라인을 참고한다.
In general, keep modal tasks simple, short, and narrowly focused.
Modal 작업이 너무 복잡하면 사람들은 하고 있던 작업을 놓칠 수 있다. 특히 modal 작업에서 계층 구조는 피하도록 한다. 만약 modal이 subview를 포함한 경우, 한가지 경로만 제공하고 완료 버튼을 명료하게 하도록 한다. 완료 버튼은 modal 작업을 완료하는 것 외에 목적으로 사용하지 않는다.
Consider using a fullscreen modal style for immersive content or a complex task.
Full screen modal은 산만함을 최소화하므로 비디오, 사진 또는 카메라 보기를 표시하거나 문서에 마크업 또는 사진 편집과 같은 다단계 작업을 수행하는 데 적합하다.
Always include a button that dismisses the modal view.
예를 들어, 완료 또는 취소 버튼을 이용할 수 있다.
When necessary, help people avoid data loss by getting confirmation before closing a modal view.
사람들이 보기를 닫기 위해 dismiss gesture를 사용하든 close 버튼을 누르든, 만약 그 행동으로 인하여 user-generated content에 손실이 발생한다면, 상황을 설명하고 해결 방법을 제공하는 작업 시트를 제공해야한다.
Make it easy to identify a modal view’s task.
사람들이 modal에 들어가면 이전 컨텍스트에서 벗어나 바로 돌아가지 않을 수 있다. Modal의 작업 이름을 지정하는 제목을 제공하거나 작업을 설명하거나 지침을 제공하는 추가 텍스트를 제공하면 사람들이 앱에서 자신의 위치를 유지하도록 도울 수 있다.
Coordinate the modal view’s appearance with your app.
예를 들어 modal에 탐색 모음이 포함된 경우 앱의 navigator bar와 동일한 모양을 사용해야 한다.
Choose a modal transition style that makes sense in your app.
앱과 조화를 이루고 일시적인 컨텍스트 전환에 대한 인식을 향상시키는 전환 스타일을 사용한다. 기본 전환은 modal를 화면 하단에서 위로 수직으로 슬라이드하고 닫힐 때 다시 아래로 슬라이드한다. 앱 전체에서 일관된 모달 전환 스타일을 사용하도록 한다.
UIViewController과 UIPresentationController 개발자 가이드라인을 참고한다.