본문 바로가기

Trulyawesome

검색하기
Trulyawesome
프로필사진 ethkelitt

  • 분류 전체보기 (29)
    • 프로그래밍 (20)
      • iOS (20)
      • Machine Learning (0)
      • Big Data (0)
      • RxSwift (0)
    • 알고리즘 (1)
      • 백준 (1)
      • 프로그래머스 (5)
      • Swift (1)
      • Codility (1)
    • 공모전 (0)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
일 월 화 수 목 금 토
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
  • IOS
  • SWIFT
  • 개발자
  • swift #iOS개발 #개발자 #Firebase #파이어베이스
  • 1743 python
  • iOS #swift #개발자
  • 개발
  • ios개발
  • developer
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록iOS #swift #개발자 (1)

Trulyawesome

Swift Userdefault로 데이터 저장하기

데이터 저장하기 앱을 개발하면서 데이터를 저장하려고 하면 저장소가 필요한데 오늘은 Firebase가 아닌 핸드폰에 간단하게 저장되는 userdefault를 사용해보려고 합니다. 1 2 3 4 5 6 7 8 9 10 11 func saveAllData() { let data = todoList.map { [ "title": $0.title, "content": $0.contents ] } let userDefaults = UserDefaults.standard userDefaults.set(data, forKey: "items") userDefaults.synchronize() } Colored by Color Scripter cs 데이터를 저장하기 위해서 key, value값이 필요합니다. Todolis..

프로그래밍/iOS 2020. 1. 21. 15:31
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바