IOS
-
[iOS|Swift] storyboard 없이 코드로 UI 구현하기Swift 2022. 5. 8. 23:35
1. Storyboard와 관련된 것들 삭제하기 1-1. Main.storyboard 삭제하기 1-2. Info.plist에서 Storyboard Name 삭제하기 1-3. General에서 Main Interface 삭제하기 실행을 해보면 까만 화면이 뜸 2. RootViewController 지정 🖍️ iOS Deployment Target 13이상인 경우에는 SceneDelegate에서 작성 SceneDelegate.swift class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, option..
-
[iOS|Swift] UIView 커스텀하기 (라운드)Swift 2022. 4. 22. 20:55
UIView 라운드 생성하기 1. 모서리 라운드 크기 지정하기 // Declaration var cornerRadius: CGFloat { get set } testUIView.layer.cornerRadius = 50 The default value of this property is 0.0. 2. 테두리 굵기 주기 // Declaration var borderWidth: CGFloat { get set } testUIView.layer.borderWidth = 10 The default value of this property is 0.0. 3. 테두리 색상 지정하기 // Declaration var borderColor: CGColor? { get set } testUIView.layer.borde..
-
[iOS|Swift] UIView 커스텀하기 (그림자)Swift 2022. 4. 22. 20:01
UIView 그림자 생성하기 1. 그림자의 불투명도 지정하기 // Declaration var shadowOpacity: Float { get set } testUIView.layer.shadowOpacity = 1 The value in this property must be in the range 0.0 (transparent) to 1.0 (opaque). The default value of this property is 0.0. 불투명도는 0 ~ 1 사이의 값을 줄 수 있음. 기본값은 0.0임 2. 그림자의 위치 지정하기 // Declaration var shadowOffset: CGSize { get set } testUIView.layer.shadowOffset = .zero testUIVi..