스위치(조건)

같은 화면에서 특정 조건을 기준으로 화면을 다르게 표시할 수 있어요.

스위치(조건) 블록은 언제 사용하나요?

  • 같은 화면에서 특정 조건을 기준으로 다른 화면을 보여주고 싶을 때 사용해요.

스위치(조건) 블록의 특징은 무엇인가요?

  • 원하는 조건을 작성하고 조건이 성립할 때와 그렇지 않을 때의 화면을 다르게 설정해서 사용해요.

  • 예를 들어 '게시글의 작성자가 본인일 때 : 게시글 상단의 더보기 아이콘 클릭 시, 수정/삭제 버튼이 나오지만, 작성자가 아니라면 신고 버튼이 나온다.' 라는 조건을 만들어 줄게요.

    1. 조건1에 ‘게시글의 작성자가 본일일 때’ 라는 조건을 아래의 이미지와 같이 작성해 주세요.

    2. 조건1 폴더 ➡︎ 더보기 아이콘에 수정/삭제 버튼이 나오도록 바텀시트 액션을 설정해 주세요.

    3. 조건2 폴더 ➡︎ 더보기 아이콘에 신고 버튼이 나오도록 바텀시트 액션을 설정해 주세요.

*조건 1을 설정하면 나머지 조건은, '조건1 외'로 자동 설정돼요.

2024.02.20 Jinny

Switch (Conditonal)

Display different outcomes on the same page based on specific conditions.

When do I use the switch (conditional) block?

  • This block is used when wanting to display different outcomes based on specific conditions on the same page.

What are the characteristics of switch (conditional) blocks?

  • The switch (conditional) block consists of 'case' and 'apply'.

  • This block is used by writing a specific condition in 'case' and setting different outcomes in 'apply', meaning that the condition can and cannot be met.

  • For example, when using the switch block for "More Settings" on the header of the details screen, you can set the condition in 'case' as "I'm the author of this post".

2023.07.26 Hwaran

#스위치(조건), #특정 조건을 기준으로 다른 화면을 보여주는 방법

Last updated