
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 import SwiftUI struct ContentView: View { @State private var isOn = false var body: some View { Toggle("\(isOn.description)", isOn: $isOn) .toggleStyle(CustomToggle()) .frame(width: 200, height: 50) } } struct ContentView_Previews: PreviewProvider { s..

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 32 33 34 35 36 37 38 39 40 41 42 43 44 import SwiftUI struct ContentView: View { var body: some View { TabView{ FirstView() .tabItem { Image(systemName: "person") Text("person") } SecondView() .tabItem { Image(systemName: "person.fill") Text("person.fill") } .edgesIgnoringSafeArea(.top) } } } struct FirstView: Vi..

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 32 33 34 35 36 37 38 import SwiftUI struct ContentView: View { init(){ let myAppearance = UINavigationBarAppearance() myAppearance.titleTextAttributes = [.foregroundColor : UIColor.blue, .font : UIFont.italicSystemFont(ofSize: 30)] myAppearance.largeTitleTextAttributes = [.foregroundColor : UIColor.purple] myAppe..
형식을 맞추는 목적 - 코드 형식은 의사소통의 일환이다. - 처음 잡아놓은 구현 스타일은 코드에 계속 영향을 줌. 적절한 행 길이를 유지하라 - 일반적으로 큰 파일보다 작은 파일이 이해하기 쉬움. 신문기사처럼 작성하라 - 기사의 첫 문단은 전체 기사 내용을 요약한다. 코드에선 그 역할을 이름이 한다. 이름만 보고도 올바른 모듈을 살펴보고 있는지 아닌지를 판단할 정도로 신경 써서 짓는다. - 아래로 내려갈수록 세세하게 묘사하기. 마지막에는 가장 저차원 함수와 세부 내역이 나와야함. 개념은 빈 행으로 분리하라 - 개념 사이는 빈 행을 넣어 분리해야함. ex. 패키지 선언부, import문, 각 함수 사이 - 하나의 개념 덩어리가 한 덩어리로 보이도록. 세로 밀집도 - 줄바꿈이 개념을 분리한다면 세로 밀집도는..

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 32 import SwiftUI struct ContentView: View { @State private var myString = "hello world" @State private var showPlaceHolder = false var body: some View { VStack{ VStack{ Image(systemName: "person") .resizable() .frame(width: 100, height: 100) .clipShape(Circle()) .overlay(Circle().stroke()) Text(myString).padding..

- Grid : CollectionView 와 비슷, 바둑판 배열 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 import SwiftUI struct ContentView: View { var columns:[GridItem] { [GridItem(.fixed(100))] } var body: some View { ScrollView(.vertical){ ScrollView(.horizontal){ LazyHGrid(rows:..

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 import Foundation import UIKit import WebKit class WebViewController: UIViewController, WKNavigationDelegate{ @IBOutlet weak var WebView: WKWebView! var url = "https://google.com" override func viewDidLoad() { let stringToURL = URL(string: url) self.WebView.navigationDelegate = self self.WebView.load(URLRequest(url: stringToURL!)) } ..

예제 코드 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 32 33 34 35 36 37 38 39 40 41 42 43 import SwiftUI struct ContentView: View { @State private var isShowAlert = false @State private var selectText = "x" var body: some View { VStack{ Button("show alert") { isShowAlert.toggle() } .alert(isPresented: $isShowAlert, content: { let primaryButton = Alert.Button.d..
- Total
- Today
- Yesterday
- BFS
- SwiftUI
- 알고리즘
- 링커
- 생명 주기
- 클린 코드 정리
- 의존성
- 면접질문
- 이분탐색
- clean code 정리
- 전처리기
- 여행경로
- 주입
- XcodeBuildSystem
- 메모리 순환참조
- 프로그래머스
- ios simulator
- 순환참조
- dfs
- 의존관계역전법칙
- XCFramework
- clean code
- ios
- 학교 과제
- Swift
- swiftc
- 클린 코드
- 클린 코드 줄거리
- CLANG
- 단어변환
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |