본문 바로가기

seong_hye, the developer

검색하기
seong_hye, the developer
프로필사진 seong_hye

  • My P_Life (116)
    • JAVA (3)
    • 알고리즘 코드 (3)
    • IOS (97) N
      • SwiftUI (24)
      • UIKit (12)
      • Error (7)
    • Infomation (6)
      • Firebase (1)
      • Git (1)
    • Daily Life (3)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/08   »
일 월 화 수 목 금 토
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
Tags
  • segue
  • NotificationCenter
  • list
  • protocol
  • escaping
  • Observer
  • http
  • class
  • Git
  • struct
  • 화면전환
  • IOS
  • viewlifecycle
  • calendar
  • uikit
  • PushNotification
  • error
  • SWIFT
  • SWIFTUI
  • mvvm
  • array
  • self
  • Animation
  • Switch
  • ScrollView
  • apns
  • singleton
  • Refresh
  • 고차함수
  • 글또
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록indexoutofrange (1)

seong_hye, the developer

오류 해결) swift:600: Fatal error: Index out of range

❗️ "Index out of range" error 해결 ❗️Swift에서 가장 자주 마주하게 되는 오류라고 할 수 있음 Index out of range = 배열이나 컬렉션의 범위를 벗어난 인덱스에 접근할 때 발생하는 에러 🔹 자주 발생하는 원인- 인덱스를 하드코딩 했는데 값이 없을 경우let arrays = [1, 2, 3, 4, 5]for i in 0...5 { // error ~> 갯수는 5개지만 인덱스는 0~4까지임} - 빈 배열에서 접근 시도var arrays = []print(arrays[0]) // error ~> 아직 값이 들어오지 않았음 - 비동기 작업에서 배열 변경 후 접근var arrays = []arrays.getArray()...if ( ... ) { arrays.remove..

IOS/Error 2022. 10. 28.
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바