일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 문자열
- gcd
- WebView
- 다크모드
- SwiftUI
- Android
- swipe
- subscript
- github
- 웹뷰
- RxSwift
- Java
- Realtime Database
- dictionary
- UIScrollView
- autolayout
- SwiftLint
- Observable
- Alamofire
- Apple
- LazyHStack
- string
- NavigationLink
- Firebase
- ios
- UITabBarController
- UIButton
- 라이트모드
- remote config
- Swift
- Today
- Total
목록분류 전체보기 (158)
점진적 과부하 개발 블로그

문자열 접근과 수정 문자열 인덱스 각 String값은 문자열에 각 Character의 위치에 해당하는 String.Index인 인덱스 타입을 가지고 있다. Swift 문자열은 정수값으로 인덱스를 생성할 수 없다. 문자열 범위를 벗어나면 런타임 에러가 발생한다. let hello = "Hello" hello[hello.startIndex] // H hello[hello.index(before: hello.endIndex)] // o hello[hello.index(after: hello.startIndex)] // e let index = hello.index(hello.startIndex, offsetBy: 3) hello[index] // l 삽입과 삭제 insert(_:at:) // 하나의 문자를 삽..

Swift 다크모드 라이트모드 구분하기 다크모드 && 라이트모드 구분하기 if self.traitCollection.userInterfaceStyle == .dark { // 다크 모드 } else { // 라이트 모드 }

iOS LaunchScreen UIImageView 이미지 변경 안될 때 시뮬레이터로는 잘 되는데 실제기기에서 런치스크린에서 이미지 변경이 안될때가 있다 그럴 때 제가 해결한 방법이다. 이런저런 방법을 써도 런치스크린 이미지 변경이 안될 때 해당 앱을 삭제한다 기기를 재실행 한다. 다시 설치 및 실행한다. 해결. iOS Keeping old launch screen and app icon after update I have an app where I recently replaced the launch images and app icons, I removed all of the old assets from everywhere in the project. When I upgrade the app from t..

Swift WebView 로딩 애니메이션 적용하기 UIActivityIndicatorView 간편하게 로딩 애니메이션을 적용하고 싶을 때 사용하면 좋습니다. UIActivityIndicatorView | Apple Developer Documentation A view that shows that a task is in progress. developer.apple.com 적용해보기 class ViewController: UIViewController { var indicatorView = UIActivityIndicatorView() // indicatorView 선언 override func viewDidLoad() { super.viewDidLoad() view.addSubView(indicator..

Swift WebView 뒤로가기 제스처(스와이프) 권한 해제 웹뷰 뒤로가기 제스처 권한 해제 webView.allowsBackForwardNavigationGestures = false allowsBackForwardNavigationGestures | Apple Developer Documentation A Boolean value that indicates whether horizontal swipe gestures trigger backward and forward page navigation. developer.apple.com

Swift UserDefaults 값 초기화 UserDefaults 값 초기화(모든 키 값 삭제) for key in UserDefaults.standard.dictionaryRepresentation().keys { UserDefaults.standard.removeObject(forKey: key.description) } dictionaryRepresentation() | Apple Developer Documentation Returns a dictionary that contains a union of all key-value pairs in the domains in the search list. developer.apple.com

Swift WebView 자바스크립트 함수 호출하기 evaluateJavaScript(_:completionHandler:) 앱에서 자바스크립트 함수를 호출하기 위해서는 위 메서드를 활용해야 합니다. 매개 변수 JavaScriptString -> 호출할 자바스크립트 함수명을 넣어줍니다. completionHandler -> 함수 호출을 한 뒤 실행 될 핸들러입니다,자바스크립트 함수 호출이 성공/실패 여부 상관없이 무조건 호출됩니다. 사용 예시 webView.evaluateJavaScript("JavaScriptMethod()", completionHandler: nil) evaluateJavaScript(_:completionHandler:) | Apple Developer Documentation Ev..