전체 글


PinLayoutLayout Framework(SnapKit 같은)오토 레이아웃에 의존하지 않음간편하고 빠름(Auto Layout보다 8~12배 빠름) GitHub - layoutBox/PinLayout: Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fastFast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer] - layoutBox..


ChartsAndroid MPCharts와 유사Line, Pie, Bar 등등 여러 종류의 차트를 만들 수 있음설치 방법은 아래 github 링크를 참고 GitHub - ChartsOrg/Charts: Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart. - ChartsOrg/Chartsgithub.com Model샘플 데이터는 Upbit API(마켓 정보 조회 / 캔들 조회)를 사용하였다.종목 조회 / 종목 시세 조회 Model 만들기// 종목 조회s..


Button 액션을 시작하는 가장 기본적인 컨트롤 UIKit의 UIButton과 같은 역할 기본적인 Button의 선언 Button(action: { // 버튼 액션 }){ Text("버튼") // Button Title } Button 사용 HStack(spacing: 20){ // 첫 번째 버튼 Button("Button"){ print("Button1") } // 두 번째 버튼 Button(action: { print("Button2") }){ Text("Button") .padding() .background(RoundedRectangle(cornerRadius: 10.0).strokeBorder()) } // 세 번째 버튼 Button(action:{print("Button3")}){ Circl..


DispatchGroup : 하나의 단위로 모니터링할 수 있는 작업들의 그룹- 여러 작업을 그룹에 추가하고 동일한 Queue 또는 다른 Queue에서 실행되도록 예약할 수 있음- 그룹 내의 모든 작업이 실행 완료 후 completionHandler를 실행- 그룹의 모든 작업이 실행 완료할 때까지 동기적(sync)으로 기다릴 수 있음 // 그룹 생성let group = DispatchGroup()// main Queue를 group에 추가DispatchQueue.main.async(group: group){}// group의 작업이 완료되었을 때 main Queue에 알림group.notify(queue: DispatchQueue.main){} 참고 iOS Concurrency(동시성) 프로그래밍, 동기 ..


1. TextField 선언하기private lazy var textView: UITextView = { let textView = UITextView() textView.delegate = self textView.textColor = .secondaryLabel textView.font = .systemFont(ofSize: 16.0, weight: .medium) textView.text = "" // PlaceHolder Text 입력 return textView}() 2. UITextViewDelegate - textViewDidBeginEditing 사용extension ViewController: UITextViewDelegate{ func textVie..


Swift에서 WKHTTPCookieStore를 사용하여 쿠키를 관리할 수 있다. WKHTTPCookieStore(Class) : 특정 웹뷰와 관련된 HTTP Cookie를 관리하는 개체 웹페이지의 초기 쿠키를 지정하고 웹 콘텐츠의 쿠키를 관리할 때 사용 예를 들어 사용자가 로그아웃을 할 때 현재 세션에 대한 쿠키를 WKHTTPCookieStore을 이용하여 쿠키를 삭제할 수 있음 쿠키 관리 // 저장된 모든 쿠키를 비동기로 가져와 지정된 completionHandler에 전달 func getAllCookies(([HTTPCookie]) -> Void){} // WKHTTPCookieStore에 쿠키를 추가 func setCookie(HTTPCookie, completionHandler: (() -> V..