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

Realm github 링크 NoSQL 데이터베이스 UserDefaults, CoreData 같은 로컬 DB 무료인데, 빠르고, 사용하기 쉽다 안드로이드나 Flutter 같은 다른 플랫폼과의 DB 공유도 가능 설치법 SPM, CocoPods, Carthage 모두 가능하다. 설치 방법 링크 사용법 모델 선언 import RealmSwift class Alert: Object { @objc dynamic var idx: Int = 0 @objc dynamic var time: String = "00:00" @objc dynamic var isOn: Bool = false convenience init(time: String) { self.init() self.time = time } } primary ke..

Realm을 처음 사용하면서, 객체를 참조하기만 해도 Realm에 접근하게 되며, 접근시 메인쓰레드가 아니면 안된다는 것을 알았습니다. class NotificationManager { ... func getAuthoState(enableHandler: (() -> ())? = nil, disableHandler: (() -> ())? = nil ) { UNUserNotificationCenter.current().getNotificationSettings { settings in switch settings.alertSetting { case .enabled: // 알림 권한이 있으면 enableHandler 실행 if let enableHandler = enableHandler { enableHand..
class MyCell: UITableViewCell { ... func initFunc() { ... myButton.addTarget(self, action: #selector(myFunc(_:)), for: .touchUpInside) ... } @objc myFunc(sender: UIButton) { ... } ... } 이런식으로 셀 안에서 addTarget으로 셀 안에 있는 @objc func을 연결해줘봤자, .touchUpInside 이벤트를 받고, 처리하는 객체는 Cell 보다 상위에 있는 뷰컨트롤러가 합니다. 그래서 self는 상위에 있는 뷰컨으로 바뀌어야 할 것이며, @objc함수로 뷰컨에다가 선언해야합니다. 그러면 셀 안에 굳이 VC를 전달하고, 다시 함수를 참조해야하는데, 그것보다..
var myButton = UIButton(type: .system) ... myButton.setTitle("text", for: .normal) ... myButton.setTitle("text2", for: .normal) 위와 같이 .system 타입으로 선언한 버튼에, 두번째 setTitle을 하게 되면, 버튼의 텍스트들이 천천히 사라졌다가 나타나는 애니메이션이 적용됩니다. 이런 애니메이션을 원하지 않을 경우, var myButton = UIButton(type: .system) ... myButton.setTitle("text", for: .normal) ... UIView.setAnimationsEnabled(false) myButton.setTitle("text2", for: .normal..
콜렉션뷰를 유저가 스와이프할 때, 어떤 위치의 아이템을 보여줄지 알아내는 소스 func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer) { // 스와이프시 애니메이션 끝날 떄 위치를 미리 알 수 있음 let index = Int(targetContentOffset.pointee.x / view.frame.width) ... }

네이버 아이디로 로그인(네아로) 구현 후, QA를 위해 Jenkins 빌드 후 Ad hoc 배포를 했는데 네아로가 안되는 현상이 발견 되었습니다. 분명 디바이스 USB로 바로 꽂아서 실행할 때는 잘 되는데, 빌드 서버를 거치고 난 후에는 안되서 대체 뭔일인가 싶었습니다. 여러번의 삽질 끝에, 추측이 맞아 떨어져서 해결하였고, 같은 문제점으로 고생하시는 분이 계실까봐 작성합니다. 네이버의 가이드나, 여러 블로그들을 보고 따라하신 착한 개발자분들은 Client ID, Client Secret, App Name, UrlScheme들을 NaverThirdPartyConstantsForApp.h 요기에 쓰셨을 텐데, 저희 팀에서는 Git Push시, Pod 관련 파일은 제외하고 올리다보니, NaverThirdPa..
파이썬에서는 json 모듈을 지원합니다 import json 해당 모듈에는 load, loads, dump, dumps 함수가 있으며 이들을 사용해서 파이썬의 디렉토리, JSON 문자열, JSON 파일로까지 자유롭게 다룰 수 있습니다 load : JSON 파일 -> 파이썬 디렉토리 dump : 파이썬 디렉토리 -> JSON 파일 loads : JSON 문자열 -> 파이썬 디렉토리 dumps : 파이썬 디렉토리 -> JSON 문자열 간단한 예제를 보여주겠습니다 1) dump를 이용하여 JSON 파일 생성하기 dict = { "ipas" : [ { "buildVersion" : "{}".format(buildVersionStr), "time" : "{}".format(date) } ] } with open(..

세상이 정말 좋아졌습니다. 애니메이션까지 디자이너분이 만들어주시면 적용만 하면 되다니! (물론 뷰를 가지고 하는 애니메이션은 개발자 영역이지만..) Free Lottie Animation Files, Tools & Plugins - LottieFiles The world’s largest online platform for the world’s smallest animation format for designers, developers, and more. Access Lottie animation tools and plugins for Android, iOS, and Web. lottiefiles.com Lottie란, json 파일을 읽는 식으로 애니메이션을 구현할 수 있는 서드파티 입니다. => 따라..