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

언제부턴가 막혀서 해당 꼼수로 email 받아올 수 없게 되었따.. 애플로그인시 해당 함수로 콜백되며, email을 포함한 각종 유저 정보를 얻을 수 있다. func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { guard let credential = authorization.credential as? ASAuthorizationAppleIDCredential else { return } let email = credential.email let user = credential.user var authCode = "" if l..
UIActivityViewController로 action sheet를 띄우거나, share기능을 만들거나 할 때, iPad 지원을 위해 popoverPresentationController를 설정하곤 한다. 1. popoverPresentation을 띄울 뷰를 설정한다. vc.popoverPresentationController?.sourceView = view 2. 설정해준 뷰에서, popoverPresentation를 띄울 좌표를 설정 할 수 있다. vc.popoverPresentationController?.sourceRect = CGRect(x: view.bounds.midX, y: view.bounds.midY, width: 0, height: 0) 3. popoverPresentation는 ..
Dictionary -> Data /// 1 let imageData = UIImage(named: "sissor")?.jpegData(compressionQuality: 0) let dict: [String: Any] = [ "string": "bbb", "data": imageData, "array": ["aaaa", "bbbb", 1234] ] let dictData = try? PropertyListSerialization.data(fromPropertyList: dict, format: .binary, options: .zero) /// 2 let jsonData = try? JSONSerialization.data(withJSONObject: dict) Data -> Dictionary ///..
let userAgent = UIWebView().stringByEvaluatingJavaScript(from: "navigator.userAgent")! + " \(customAgent)" UserDefaults.standard.register(defaults: ["UserAgent" : userAgent]) 이렇게만 해주면 정말 신기하게도; WKWebView의 userAgent 기본값으로 세팅된다. ( webview.customAgent = "\(필요한 값)" 이런식으로 안넣어줘도 말이다!! ) 오우오우 신기방기 그런데 iPhone에서만 기본값으로 세팅되고, iPad는 세팅이 안된다; 이게 대체 모손일이야....... 결국 iPad까지 고려하면, 아래처럼 세팅 해줘야한다.. webView.custom..
네비게이션바에는 기본값으로 하단에 회색 1px짜리 라인이 있다 = shadowImage UIScrollViewDelegate를 채택한 뷰컨의 경우, 스크롤 할 때, 이 shadowImage를 바꿀 수 있는 설정이 있다. 아래처럼하면 스크롤시 shadowImage가 사라지는 효과를 줄 수 있다. let scrollEdgeAppearance = UINavigationBarAppearance() scrollEdgeAppearance.shadowColor = .clear // 스크롤 될 때의 shadowImage의 색깔 naviBar?.scrollEdgeAppearance = scrollEdgeAppearance let standardAppearance = UINavigationBarAppearance() st..
navigationBar.backgroundImage 의 기본값은 nil 이다 그런데 Xcode 12.4 에서는 하얀색 이미지. Xcode 13.0 에서는 투명색 이미지. 를 보여준다 ㅡㅡ 고치려고 navigationBar.setBackgroundImage를 사용해 보았는데, Xcode 13.0에서는 사용할 수 없는 함수이다 ㅋㅋㅋ....ㅠ 이제부턴, UINavigationBarAppearance를 사용해서 navigationBar의 설정을 만져야한단다~ 아래 코드처럼 말이다. if #available(iOS 13.0, *) { let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance...

UITextView에 커스텀 Placeholder를 적용했을 때 버그가 발생했다. 에러명 : NSInternalInconsistencyException 이유 : Invalid parameter not satisfying: pos 실제 디바이스, 시뮬레이터 iOS15에서 발생했으며, 시뮬레이터 iOS14.4에서는 발생하지 않았다... 애플아ㅏ아아아아아악 에러가 발생한 시나리오 ( Error Scenario ) UITextView에 Placeholder용도의 Text를 넣어둔다. ( text = "내용을 입력해주세요." ) 아래처럼, textViewDidBeginEditing 에서 텍스트를 비워주게 코딩한다. ( text = "" or text = nil ) func textViewDidBeginEditin..
그동안 Xcode 12.4를 사용하다가, 13로 업데이트 했다. 그런데 기존에 잘 배포하고있던 앱이, Archive 시 RealmSwift에서 에러가 발생했다. 처음엔 업데이트한 Xcode가 문제겠거니 생각했다가, 지인과 오픈톡에 물어보니 나만 겪는 현상이었다. 즉 Xcode 13만의 문제가 아니였다. RealmSwift 같은 몇몇 프레임워크들은 Xcode의 버전에 종속성을 가진다. Releases · realm/realm-cocoa Realm is a mobile database: a replacement for Core Data & SQLite - realm/realm-cocoa github.com 위의 Realm Github에서 확인해보면, Xcode 12.4에서는 RealmSwift 10.7.2를..