Danny의 iOS 컨닝페이퍼
반응형
article thumbnail
[iOS/Swift] ARC (Automatic Reference Counting)
Xcode 2022. 12. 21. 19:50

Swift에서는 자동으로 힙 영역의 메모리 관리해주는 ARC가 있습니다. ARC는 클래스 인스턴스가 더 이상 필요하지 않을 때 메모리를 자동으로 해제한다 ARC의 메모리 관리 객체(힙 영역)의 참조 횟수를 계산하여 RC가 0이 되면 자동으로 메모리를 해제합니다. 💡 RC: Reference Count == 이 객체를 참조하고 있는 숫자 참조 카운트 세는 법 Count Up +1 Count Down -1 강한 참조, 약한 참조, 비참조 강한 참조(Strong) default(기본) 값이 기본으로 강한 참조입니다. 순환 참조(Strong Reference Cycle): 영구적으로 메모리가 해제되지 않을 수 있어요. 힙 영역에서 서로가 서로를 참조할 경우 약한 참조(Weak) 오직 변수(var)에만 선언 가능..

article thumbnail
[iOS/Swift] 프로젝트 이름 변경
Xcode 2022. 12. 21. 18:39

1. 프로젝트 이름 변경 (폴더명도 같이 변경하기) 2. Rename 클릭 3. Manage Schemes 클릭 4. 이름 변경 (enter 필수) 5. plist 이름 및 번들 이름 변경 6. 만약 Capability로 (Entitlements) 설정도 해줬을 경우 파일은 삭제한 뒤 빈칸으로 만들어 준다. (자동 업데이트 됨)

article thumbnail
[iOS/Swift] UITextField 설정
UIKit/Swift 2022. 12. 20. 20:36

텍스트 필드 여러 설정들 UI 관련 textField.frame.size.height = 22 // 프레임 높이 textField.borderStyle = .roundedRect // 테두리 스타일 textField.autocorrectionType = .no // 자동 수정 활성화 여부 textField.spellCheckingType = .no // 맞춤법 검사 활성화 여부 textField.autocapitalizationType = .none // 자동 대문자 활성화 여부 textField.placeholder = "이메일 입력" // 플레이스 홀더 textField.clearButtonMode = .always // 입력내용 한번에 지우는 x버튼(오른쪽) textField.clearsOnBegi..

article thumbnail
[iOS/Swift] FireBase 사용법
Xcode/Library 2022. 12. 20. 03:39

Package Manager Link 라이브러리 Firebase 추가하는 방법 1. 앱 등록 - Bundel Identifier와 동일하게 Apple 번들 ID 설정을 합니다 2. plist 다운 후 xcode로 이동시켜 주세요. 3. FireBase 라이브러리 설치를 합니다. 4. 초기화 코드 추가 사용자 인증 인증으로 들어가 원하는 로그인 방식 선택 (사용 설정 체크) 신규 사용자 등록 & 기존 사용자 로그인 ⭐️ FireBase에는 비밀번호 규칙이 존재한다 (6자리 이상) 신규 가입 시 - Auth.auth().createUser 기존 사용자 로그인 시 - Auth.auth().signIn 사용 Authentication 문서 Apple 플랫폼에서 Firebase 인증 시작하기 Cloud Fires..

article thumbnail
[iOS/Swift] Realm 사용법
Xcode/Library 2022. 12. 20. 01:44

Package Manager https://github.com/realm/realm-swift.git 글을 엉망진창으로 써놔 추후에 다시 깔끔히 정리해 올릴 예정입니다. 😓 간단 사용법 맛보기 1. AppDelegate에서 realm 생성 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { do { let realm = try Realm() } catch { print("Error initialising new realm \(error)") } return true } 2. 데이터 모델 제작 import ..

article thumbnail
[iOS/Swift] 라이브러리 주소
Xcode/Library 2022. 12. 20. 01:31

텍스트필드 레이아웃 (키보드에 맞춰서 올라가게 하기) https://github.com/hackiftekhar/IQKeyboardManager Alamofire https://github.com/Alamofire/Alamofire Firebase https://firebase.google.com/?hl=ko https://github.com/firebase/firebase-ios-sdk Realm Realm Swift SnapKit https://github.com/SnapKit/SnapKit Swipe Cell https://github.com/SwipeCellKit/SwipeCellKit 카멜레온 그라디언트 컬러 https://github.com/wowansm/Chameleon Swifty JSON ..

반응형