본문 바로가기 메뉴 바로가기

Peppo

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Peppo

검색하기 폼
  • 분류 전체보기 (221)
    • Story (13)
    • iOS (143)
      • Error (11)
    • 알고리즘 (43)
    • ETC (7)
    • React-Native (0)
    • CS (Computer science) (3)
  • 방명록

Swift CollectionView 데이터가 없을때 (1)
[iOS] CollectionView - Empty state (데이터가 없을시 보여줄 화면)

앱을 만들다가 CollectionViewCell에 데이터가 없을때 즉, Empty state일때 아무것도 없는 화면 보다 데이터 추가를 유도 하는 문구를 나타내는게 필요할것 같아 공부해봤습니다. 먼저 UICollectionView의 Extension에 아래 두개 메소드를 추가해줍니다. // Extension.swift import Foundation import UIKit // MARK: UICollectionView extension UICollectionView { // 1 func setEmptyMessage(_ message: String) { let messageLabel: UILabel = { let label = UILabel() label.text = message label.textCol..

iOS 2022. 3. 16. 20:58
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • Peppo's Github
TAG
  • ios
  • Class
  • swift 고차함수
  • Swift 알고리즘
  • swift programmers
  • Swift joined
  • Swift 프로퍼티
  • swift property
  • iOS error
  • RTCCameraVideoCapturer
  • Swift init
  • Swift Leetcode
  • Swift ModernRIBs
  • Swift 프로그래머스
  • Swift
  • 원티드 프리온보딩
  • Swift joined()
  • Swift final
  • swift reduce
  • Swift inout
  • RIBs tutorial
  • removeLast()
  • Swift Error Handling
  • 2023년 회고
  • swift protocol
  • CS 네트워크
  • Swift RIBs
  • Swift 내림차순
  • Combine: Asynchronous Programming with Swift
  • swift (programmers)
more
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바