일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Firebase Analytics
- swift 6
- 네트워크 통신
- SwiftUI
- RxSwift
- realm
- uitableviewdiffabledatasource
- Combine
- ios
- Swift Tuist
- swift db
- combinecocoa
- Tuist
- KeyPath
- SeSAC
- 카카오뱅크 ios
- xcode
- GCD
- ios database
- observable
- swift 5.9
- swift database
- JSON
- Firebase
- arc
- Subject
- Subscribe
- Tuist Swift
- ribs
- swift
- Today
- Total
목록전체 글 (87)
천원의 개발
1. 인스턴스 생성! let format = DateFormatter() // 인스턴스 생성 2. 한국 시간으로 설정! format.locale = Locale(identifier: "ko_KR") format.timeZone = TimeZone(abbreviation: "KST") 3. 날짜 형태 커스텀하기! format.dateFormat = "yyyy년\n MM월 d일 hh:mm:ss" 여기서 사용하는 yyyy는 년도를 의미하며 MM은 월 d는 일 hh:mm:ss는 각각 시간, 분, 초를 의미한다. 4. 날짜를 스트링으로 변환! let result = format.string(from: Date()) //위에서 설정해둔 "yyyy년\n MM월 d일 hh:mm:ss" 형태로 문자열을 만들어 준다 pr..
ARC(Automatic Reference Counting) 는 - 컴파일시 코드를 분석해서 자동으로 참조 카운터를 증가, 감소 시켜주는 것. - 더 이상 참조되지 않는 인스턴스를 메모리에서 해재해 주는 것 ARC가 등장하기 전에는 MRR(Manual Retain Release)를 통해 개발자가 직접 참조 카운터를 관리 했습니다. strong (강한 참조) • 해당 객체의 소유권을 가지며 자신이 참조하는 객체의 참조 카운터를 증가 시킨다 • 값을 지정하는 시점에 참조 카운터를 증가시키고 참조가 종료되면 참조 카운터를 감소시킨다 • 선언시 아무것도 적어주지 않으면 strong이 된다. class Human{ var name: String! var age: Int! init(name: String, age:..

프로그래머스 문제를 푸는 도중 진수를 변경하는 문제를 풀기 위해 공부하였다!! let a = String(15, radix: 2) // 2진수로 변경! print(a) // 1111 출력 let b = Int(a, radix: 2)! // 2진수를 다시 10진수로 변경! print(b) // 15 출력 https://developer.apple.com/documentation/swift/int/init(_:radix:)/
var dic = [5:0, 4:1, 3:2] print(dic.sorted()) // error 먼저 위처럼 dictionay에 sorted()함수를 사용하면 error가 난다! 그럼 어떻게 사용할까? var dic = [5:4, 4:1, 3:2] dic.sorted{$0.value < $1.value} // value 로 정렬 dic.sorted{$0.key < $1.key} // key로 정렬 dic.sorted{$0.value < $1.value}.map{$0.key} // 만약 value로 정렬후 key만 출력하고 싶으면 이런식으로
기존 for문은 break문을 통해 벗어날 수 있는데 중첩 for문은 어떤식으로 벗어날 수 있을까? outerLoop: for i in 1...10 { for j in 1...10 { let product = i * j print ("\(i) * \(j) is \(product)") //만약 product가 50이면 루프에서 빠져나온다. if product == 50 { print("구구단 그만!") break outerLoop } } } 위 처럼 outerLoop를 활용하면 된다.
우리가 github사용시 DB_Store처럼 업로드 하고싶지 않은 파일이 있을 수 있다. 그럴때 .gtignore파일을 생성후 DB_Store를 작성해주면 업로드를 안할 수 있다. https://github.com/github/gitignore GitHub - github/gitignore: A collection of useful .gitignore templates A collection of useful .gitignore templates. Contribute to github/gitignore development by creating an account on GitHub. github.com 또한 이사이트에 들어가보면 올릴 필요가 없는 파일들을 정리해 두었으니 복사해서 사용만 하면 된다 # X..