본문 바로가기

seong_hye, the developer

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

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

목록NSCache (1)

seong_hye, the developer

Swift) NSCache에 대해 알아보기

📘 Swift - NSCache이미지를 활용하다보면 메모리가 걱정되게 되는데 이때 사용하게 되는 NSCache에 대해 알아보자 🔹NSCache란? key - value 형태의 메모리 캐시를 쉽게 구현할 수 있도록 제공되는 클래스주로 이미지나 계산 비용이 큰 데이터를 임시로 저장하고 자동으로 제거하여 성능 개선.여러 스레드에서 동시에 접근해도 안전(Thread - safe)🔹기본 사용 예제let cache = NSCache()// 캐시에 저장cache.setObject(image, forKey: "example" as NSString)//캐시에서 가져오기if let cachedImage = cache.object(forKey: "example") { imageView.image = cachedImag..

IOS 2022. 10. 3.
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바