300x250 iOS115 버전업 앱스토어 배포 1. 앱스토어 커넥트 - 나의앱 2. 'iOS 앱' 우측 '+' 버튼 클릭 3. 업그레이드 사항 적어주기 4. 빌드 선택 적용 5. 앱 심사 정보에 테스트에 필요한 정보 적어주기 6. 저장 심사 요청 xcode에서 아카이브 후 업로드 해야 오류 없이 정상적으로 앱스토어커넥트에 올라간다 2022. 6. 10. 화면 간 데이터 전달 화면 간 데이터를 전달 할 때 사용할 수 있는 방법 크게 두가지, 특정 액션이 이뤄지면 다른 ViewController로 전달한다는 목적을 가진다. 1. Delegate 서로 다른 ViewController가 1:1로 연결될 때 예를 들어, 로그인을 해야하는 상황일 때 ' 메인VC -> 로그인VC -> 메인VC ' (메인 화면에서 로그인 화면으로 넘어갔다가 로그인이 완료되면 다시 메인으로 돌아오는 프로세스) 메인VC와 로그인VC가 1:1로 연결되므로 로그인VC에서 딜리게이트(protocol)을 생성하여 로그인이 완료되면 로그인delegate를 채택한 메인VC에서 감지하여 필요한 동작을 수행하게 해준다 코드 예제 2. Notification observer 하나의 ViewController에서 다른 여러 .. 2022. 6. 10. NotificationCenter(Observer) 노티피케이션센터는 string 키값을 이용해 여러 화면으로 noti를 보내 원하는 동작을 수행할 수 있게 해준다. 그래서 여러 화면에서 특정 액션을 캐치할 필요가 있다면 NotificationCenter 사용이 적합하다. 다만, string을 이용하면서 오탈자 발생 가능성이 있고, NotificationCenter.default에서 모든 noti가 관리되어서 딜리게이트(프로토콜)와 달리 추적이 쉽지 않다. 그래서 extenstion으로 Notification을 관리해주는 별도 클래스를 두는 것이 좋다. NotificationCenter class Notification.h typedef enum { messageNoti // 간단하게 noti key도 이렇게 관리 messageAdd, messageDel.. 2022. 6. 10. 뒤로가기 스와이프 감지 - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { if (navigationController.topViewController.transitionCoordinator) { [navigationController.topViewController.transitionCoordinator notifyWhenInteractionChangesUsingBlock:^(id context) { if (context.isCancelled == NO) { // back 성공 // do som.. 2022. 6. 2. integer 값 참조 오류 NSInteger로 값을 사용하다보면 막상 길게 의도 하지 않은 숫자로 바뀔때가 있다. 그럴때는 NSNumber의 값을 int로 형변환 하여 사용하면 된다. NSNumber * idxNum = 원하는 숫자; int idx = [idxNum intValue]; 2022. 5. 20. Extension 파일 생성 1. cocoa touch로 new file 2. extenstion 하려는 Subclass 선택 후 class명 작성 이렇게 하면 지정한 class명으로 .h와 .m 파일이 생성됨 // .h #import NS_ASSUME_NONNULL_BEGIN @interface 클래스명 : sub클래스 @end NS_ASSUME_NONNULL_END // .m #import "클래스명.h" @implementation CustomMarker @end UIView Extension 예제 - custom drawing imgae 생성 시 // .h NS_ASSUME_NONNULL_BEGIN @interface CustomImage : UIView - (UIImage*) createImage; @end .. 2022. 4. 25. Local DB 결정 시 참고 사이트 https://cocoacasts.com/core-data-or-realm Core Data or Realm I would like to dive a little deeper into the comparison between Core Data and Realm. While I have used Core Data for close to ten years, I don't have much experience with Realm. With this article, I would like to debunk a few misunderstandings about Core cocoacasts.com https://purple-log.tistory.com/13 iOS의 데이터베이스 비교 (SQLite, Core Dat.. 2022. 4. 22. UILabel에 이미지 넣기 let iconAttachment = NSTextAttachment() iconAttachment.image = UIImage(named: 이미지명)?.withRenderingMode(.alwaysTemplate) let iconOffsetY : CGFloat = -2.0; iconAttachment.bounds = CGRect(x: -4, y: iconOffsetY, width: 16.0, height: 16.0) let attachmentString = NSAttributedString(attachment: iconAttachment) let labelText = NSMutableAttributedString(string: " ") labelText.append(attachmentString) lab.. 2022. 4. 20. PDFView PDF 틀 만들기 PDFView는 PDFKit을 이용해 만들어 지기 때문에 storyboard에서 만들때는 VIew를 가져와서 class를 PDFView라고 따로 명시 해주어야 한다. 그래서 나는 storyboard에 View를 올리고 이 View를 PDFVIew의 superView로 만들어 진행하였다. PDFView 구현 1. PDFKit을 import 하고 import PDFKit 2. PDFView의 superVIew를 연결하고 class PDFViewController: UIViewController { @IBOutlet weak var supView: UIView! 3. PDFView를 선언해준다. var pdfView: PDFView! 4. PDFView를 초기화 해준 후 supView에 넣어.. 2022. 4. 11. 이전 1 ··· 6 7 8 9 10 11 12 13 다음 300x250