본문 바로가기

iOS29

[iOS/Swift] DateFormatter 클래스 사용하기 인척하는 github gist 사용 연습 2021. 4. 10.
[iOS] CocoaPods 사용법 guides.cocoapods.org/using/using-cocoapods.html CocoaPods Guides CocoaPods is fully open-sourced, so it depends on community contributions to get better. If you're looking to start working on CocoaPods, this is the place to start. guides.cocoapods.org cocoapods은 공홈이 잘 설명해뒀다. 하지만 매번 공홈에 가서 찾아보긴 귀찮으니까 정리해두는 아주 간단한 내용 우선 초기 설치는 다 했다 치고 새로운 라이브러리 추가할때 1. 프로젝트 안에 Podfile을 연다.(텍스트 편집기로 열어도 되고 terminal.. 2021. 4. 7.
[iOS] Core data copy(backup, archive) & restore with iCloud gist.github.com/atomicbird/25fed73657be4b9d3642981a4892fea4 Back up and restore Core Data persistent stores Back up and restore Core Data persistent stores. GitHub Gist: instantly share code, notes, and snippets. gist.github.com core data를 백업하고 복원하는데 필요한 NSPersistentContainer 를 확장하는 코드는 위 링크에 있다. 너무 자료가 없어서.. 난 그냥 원문 읽어가면서 했는데 혹시 나같은 사람있을까봐 써둡니다. www.atomicbird.com/blog/core-data-back-up-store/ .. 2021. 4. 2.
[iOS] UICollectionViewDelegateFlowLayout 적용 UICollectionViewDelegateFlowLayout 상속받아 메서드 구현했는데 셀 사이즈나 기타 등등이 적용이 안될때 스토리보드 가서 collectionView의 사이즈 인스펙터에서 Estimate Size를 Automatic으로 설정되어 있을텐데 None으로 바꿔줘야 코드에서 구현한 내용이 반영됨! 2021. 3. 13.
[iOS] swift tab bar 와 tool bar tab bar는 서로 독립적인 아이템들일때 사용 바로 이 앱처럼 toolbar는 현재 뷰에서 보여지는 것과 관련있는 기능일 때 사용 바로 여기에서 얘네처럼 2021. 3. 8.
[iOS] swift tab bar 사용시 presentingViewController 하나의 뷰 컨트롤러에서 다른 뷰컨트롤러를 modal로 띄웠을때 sheet로 띄우는 설정이었다면 그 전 뷰 컨트롤러가 presentingViewController가 되는데 tab bar controller를 이용하게 되면 presentingViewController가 UITabBarController가 된다. 그래서 현재 뷰를 dismiss할때 ViewController의 viewDidLoad를 해야하는데 못하는 상황 발생.. 해결 방법은 TabBarController의 children을 사용하면 된다..!! 스택오버플로우 찾아보면서 똑같은 질문이 있어서 답변을 봤는데 거기엔 definesPresentationContext를 true로 하고 modalPresentationStyle를 current cont.. 2021. 3. 8.
[iOS] 아이패드에서 UIAlertController actionSheet사용시 오류 "Your application has presented a UIAlertController () of style UIAlertControllerStyleActionSheet from App.ViewController (). The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a b.. 2021. 3. 4.
[iOS] Core Data 잊어버릴까봐 나만 알아볼수있게 정리좀 해둘게요. 나중에 정리할게요! - persistentContainer ( 이것들을 모두 포함하는 개념) - model ≒ 스키마 - context ≒ 트랜젝션 { managed object 소유(?) } - coordinator : 중계자(?) - storage : 물리적 저장소(?) model -- coordinator -- context { managed object } | storage context (트랜젝션) 에 처리하고 싶은 데이터를 담아서 저장하면 coordinator 가 storage 에 영구적으로 저장하는 형식? 인 것 같다. 근데 UIImage를 저장하고 싶은데 찾아본 결과 Binary Data로 저장하면 된다고 해서 했더니 오류나서 다시 찾아보는 .. 2021. 2. 13.
[iOS] CollectionView 1. 스토리보드에서 Object의 CollectionView 배치, CollectionViewCell 배치, cell 내부에 UI컴포넌트 배치 2. 셀 클래스 선언 (커스텀 셀) class MyCell: UICollectionViewCell{ @IBOutlet weak var Label : UILabel! } ViewController랑 같은 파일에 선언해도 되고 따로 파일 만들어서 선언해도 된다. (후자 추천) 선언 후 스토리보드 CollectionViewCell의 identity inspector에서 class명 입력해서 연결 3. ViewController에서 UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegate.. 2021. 2. 12.
728x90