일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 클린 코드
- Human interface guide
- ribs
- uiscrollview
- RxCocoa
- tableView
- swiftUI
- Observable
- combine
- SWIFT
- 애니메이션
- map
- Clean Code
- Refactoring
- ios
- HIG
- 리팩토링
- clean architecture
- UICollectionView
- 리펙토링
- 스위프트
- Protocol
- rxswift
- 리펙터링
- Xcode
- swift documentation
- MVVM
- UITextView
- uitableview
- collectionview
- Today
- Total
목록AppDelegate (3)
김종권의 iOS 앱 개발 알아가기
AppDelgate 테스트용 함수 // testPrint() func testPrint() { print("Test!!") } AppDelegate 참조 class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() if let appDelegate = UIApplication.shared.delegate as? AppDelegate { appDelegate.testPrint() } } }
Rx를 쓰지 않고 NotificationCenter를 이용한 방법은 여기 참고 NotificationCenter를 쓰는 경우 화면이 background에서 foreground로 변하는 경우 AppDelegate에서 딥링크 처리시, 특정 화면에 event를 주입해주고 알림을 보내는 경우 사용준비 pod file에 아래 정보 입력 후 pod install pod 'RxSwift' pod 'RxCocoa' 기본 구조 (케이스: AppDelegate에서 home에 노티를 보내고 싶은 경우) NotificationCenter를 구별할 수 있는 key 정의 (타입은 NSNotification.Name(_ :String)) // Constants extension NSNotification.Name { static ..
info.plist에서 해당 부분 삭제 AppDelegate.swift에서 함수 두 가지 삭제 SceneDelegate.swift삭제 후 AppDelegate 수정 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { window = UIWindow(frame: UIScreen.main.bounds) window?.rootViewController = ViewController() // 특정 ViewController window?.makeKeyAndVisible() return true } (정상 빌드 성공)