728x90
반응형

Computer Science 99

[swift] 문자열과 NsRange, String.Index

reference : https://soooprmx.com/swift-swift의-문자열과-nsrange/ Swift의 문자열과 NSRange를 함께 사용하기 · Wireframe Swift의 문자열 타입은 NSRange 타입과 호환되지 않지만, 기존의 코코아 프레임워크 내의 문자열 관련 처리 API들은 NSRange를 많이 사용한다. Swift 문자열을 이러한 API들과 사용하는 것은 매우 코드를 soooprmx.com http://seorenn.blogspot.com/2018/05/swift-string-index.html 문자열을 문자 단위로 다루기 | Swift iOS 및 macOS 용 앱 개발, Emacs, Vim, Python 위주로 다루는 Seorenn 개인 블로그 seorenn.blogsp..

[swift] 정규표현식 사용하기

reference : https://stackoverflow.com/questions/27880650/swift-extract-regex-matches Swift extract regex matches I want to extract substrings from a string that match a regex pattern. So I'm looking for something like this: func matchesForRegexInText(regex: String!, text: String!) -> [String] { ??? }... stackoverflow.com https://newbedev.com/remove-all-non-numeric-characters-from-a-string-in-swi..

[swift] 인증코드 입력 뷰 - 자동으로 textfield 넘어가기

reference : https://www.hackingwithswift.com/forums/100-days-of-swiftui/jump-focus-between-a-series-of-textfields-pin-code-style-entry-widget/765 SOLVED: Jump focus between a series of TextFields (pin code style entry widget) – 100 Days of SwiftUI – Hacking with Swift Link copied to your pasteboard. www.hackingwithswift.com https://medium.com/flawless-app-stories/swiftui-passcode-field-for-otp-a..

[swift] loading view 개발 - activity indicator

reference : https://stackoverflow.com/questions/56496638/activity-indicator-in-swiftui Activity indicator in SwiftUI Trying to add a full screen activity indicator in SwiftUI. I can use .overlay(overlay: ) function in View Protocol. With this, I can make any view overlay, but I can't find the iOS default style stackoverflow.com https://morioh.com/p/a59734fa4f8c Explore the New Features in SwiftU..

[swift] texfield에 길이제한두기

swiftUI textfield에 길이 제한둬서 입력방지 textfield에 길이를 제한둬서 일정 길이를 넘어서면 더이상 입력이 안되게끔 하는 것이 목표..! (왼쪽이 우리가 하고자 하는 것) 먼저, TextLimiter 클래스를 만든다 - Publish 값을 사용하기 위해 ObservableObject로 만들어준다 - 먼저 기본적인 틀을 잡아본다 (변수들과 변수들에 담을 의미, 로직 등) class TextLimiter: ObservableObject { private let limit: Int init(limit: Int) { self.limit = limit } @Published var value = "" @Published var hasReachedLimit = false } - 여기서 limi..

[swift] debugging을 위해 view에서 print문 찍는법

출처 https://www.swiftbysundell.com/articles/building-swiftui-debugging-utilities/ Building SwiftUI debugging utilities | Swift by Sundell When working on any kind of app or system, it’s almost guaranteed that we’ll need to debug our code at one point or another. For example in order to reproduce a bug that’s been reported to us by either a tester or a user, to track down a race conditi www.swiftb..

[swift] @State, @ObservedObject, @EnvironmentObject 차이!! (+@Binding)

references : https://pxxxsxzy.tistory.com/35 SwiftUI @State, @ObservedObject, @EnvironmentObject ⭐️ 본격적으로 SwiftUI를 공부하기 전 꼭 기억해야 할 점 ⭐️ 우리는 더이상 view에 직접 접근해서 view를 바꾸지 않는다. 대신 view의 state를 변경해서 그 변경된 state가 결과를 좌우하도록 한다. pxxxsxzy.tistory.com https://www.hackingwithswift.com/quick-start/swiftui/whats-the-difference-between-observedobject-state-and-environmentobject What’s the difference between @..

[swift] keyboard따라 같이 올라가는 view 문제 (disable move up with keyboard)

https://stackoverflow.com/questions/65605917/how-do-you-prevent-swiftui-from-autoresizing-view-when-keyboard-appears How do you prevent SwiftUI from autoresizing view when keyboard appears I have a TextField in my iOS app, and it is positioned such that I don't want it to move when the keyboard appears. However, the view is autoresizing when the keyboard appears. Is there a way to pr... stackove..

728x90
반응형