일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Code
- Xcode
- IOS
- 이미지
- shorebird
- Swift
- 웹뷰
- Realm
- mac
- Session
- Archive
- darkmode
- iOS16
- Git
- SwiftUI
- appstore
- github
- Notification
- rxswift
- 개발자
- error
- MacOS
- 한글
- Apple
- geofencing
- window
- JPA
- UIButton
- FLUTTER
- Today
- Total
목록Swift (183)
EEYatHo 앱 깎는 이야기

React Native 에서 Objective-C 코드를 호출하는 공식 설명이 좀 난잡해서 정리한다. RN Objective-C 코드 호출 공식 설명 글 구현 방법 요약 RCTCalendarModule.h 파일 생성 및 코드 입력 RCTCalendarModule.m 파일 생성 및 코드 입력 App.js 코드 수정 실행 및 확인 RCTCalendarModule.h RN 프로젝트의 iOS 프로젝트에 RCTCalendarModule.h 를 만든다. RCTCalendarModule 의 Calendar 은 공식 설명글에서 네이티브의 캘린더 기능 호출하고자 해서 붙혀진 이름이다. RCT 는 React 의 약어이다. 모듈 이름은 원하는 대로 수정해도 된다 ( ex. RCTSwiftModule, RCTVibration..

Dynamic Image 런타임에서 다크모드, 라이트모드 변경에 대응하는 다이나믹 이미지 ( Dynamic Image ) 가 있다. ( Dynamic Color 처럼 ) 다이나믹 이미지는 AssetCatalog 나 Code 로 생성할 수 있다. 1. AssetCatalog 로 Dynamic Image 생성하기 UIImage(named: "MyImageName") 2. Code 로 Dynamic Color 생성하기 UIImage 에게 추가 작업 ( resize 등 ) 을 하게되면, 코드로 생성하는게 필요해진다. func dynamicImage(lightImage: UIImage, darkImage: UIImage) -> UIImage { let darkTC = UITraitCollection(traitsF..

iOS16 에서 특정 조건을 만족하는 케이스에서 present 시 UI 가 깨진다. 버그 조건 설명 iOS16 디바이스의 orientation 과, 앱에서 인지하는 orientation 이 다른 상황 modalPresentStyle 이 pageSheet 와 formSheet 가 아닌 viewController 를 present 구현 영상 with gif iOS16 시뮬레이터에서, 디바이스의 방향은 potraits, 앱의 방향은 landscape 로 바꾼 뒤, ( 그 반대도 버그가 발생한다. ) modalPresentStyle 을 overFullScreen 으로 present 하는 gif 이다. 앱의 orientation 를 무시하고 디바이스의 orientation 에 맞게 present 되어버린다. ho..
줄바꿈을 어떻게 구현해야할지 고려하지 않고 손쉽게 이미지를 텍스트 옆에 넣을 수 있다. attributedString 에 이미지를 넣는 것이다. 구현 ( with extension ) extension NSMutableAttributedString { func appendImage(image: UIImage, bounds: CGRect) { let imageAttachment = NSTextAttachment() imageAttachment.image = image imageAttachment.bounds = bounds self.append(NSAttributedString(attachment: imageAttachment)) } func insertImage(image: UIImage, bounds:..

에러 내용 Archive 후, appstore upload를 진행할 때 발생. Asset validation failed Invalid Pre-Release Train. The train version '15.1.1' is closed for new build submissions (ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) Asset validation failed This bundle is invalid. The value for key CFBundleShortVersionString [15.1.1] in the Info.plist file must contain a higher version than that of the previously approved versi..

Scene의 화면회전 제어 로직이 변경되면서, 기존에 사용하던 UIDevice 방식은 deprecated 되었다. // is deprecated let value = UIInterfaceOrientation.landscapeRight.rawValue UIDevice.current.setValue(value, forKey: "orientation") 해당 방식으로 강제 화면 회전시, 친절하게 아래와 같은 에러가 발생한다. ( UIWindowScene.requestGeometryUpdate 를 사용해달라는 말. ) 새로 사용해야 될 함수 : 적용 코드 : /// 화면 가로로 바꾸기 if #available(iOS 16.0, *) { let windowScene = UIApplication.shared.con..
고차함수 ( Higher-order function ) 함수(클로저)를 파라미터로 받거나, 함수를 리턴하는 함수 Swift에서 제공하는 고차함수를 셀수도 없이 많다. 자주 사용하는 순으로 정리한다. map filter reduce forEach compactMap flatMap map Array에서 모든 값들에게 같은 연산을 적용한 새로운 Array를 만든다. let cast = ["Vivien", "Marlon", "Kim", "Karl"] let lowercaseNames = cast.map { $0.lowercased() } // ["vivien", "marlon", "kim", "karl"] let letterCounts = cast.map { $0.count } // [6, 6, 3, 4] fi..

배경 설명 아래처럼, 네비게이션바에 커스텀 뷰를 넣는 식으로 사용하고 있었는데 navigationItem.titleView = myCustomView iOS16 에서 네비게이션바의 UI가 깨졌다. 버튼들이 클릭이 안되고, 가운데로 몰리고, 보이지 않는 경우도 있었다. 가운데로 검색바는 찌그러졌었다. iOS16 에서 UIKit 이 변경된게 무엇인지 발표하는 WWDC 도 살펴보았고, iOS16, navigation Bar 기타 등등.. 여러 구글링을 해도 답이 보이지 않았다. ( 이런거나 계속 나오고 -ㅅ- ) 삽질 끝에 발견한 현상 iOS16 이전에는, titleView 의 부모가 _UINavigationBarContentView 였다. _UINavigationBarContentView 는 titleVie..