목록UIKit 기초 (40)
기어가더라도 제대로

자주 쓰는 초식을 전개해 봤습니다. 아래의 초식들은 viewDidLoad 함수나, 전역적으로 선언한다면 AppDelegate에 하는 것이 좋습니다. 타이틀 영역에 이미지를 넣고 이를 좌측 정렬, 왼쪽으로 밀기appearance 선언과 설정은 자주 나와서 처음만 보여드리고 생략// appearance 선언let appearance = UINavigationBarAppearance()appearance.configureWithOpaqueBackground()// 상단 이미지 로고 뷰 생성let logoImageView = UIImageView(image: UIImage(resource: ))logoImageView.contentMode = .scaleAspectFit// 이미지 뷰를 타이틀로 선언naviga..

구현 목표스레드 앱처럼 탭 바 가운데에 + 버튼의 화면 전환이 모달식으로 구현하는 것이 목표모달 탭바 컨트롤러 구현SceneDelegate에서 코드로 화면 구현class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as? UIWindowScene) else { return } let window = UIWind..

언제 사용하는가?수평으로 구성된 여러개의 버튼을 나열하고, 각각의 버튼을 하나씩 선택된 상태로 이용하고 싶을 때 사용UISecmentedControl: 여러개의 파편(Segment)으로 구성된 수평 컨트롤, 각 파편은 구별된 버튼으로 기능구현 편의를 위해, SnapKit, Then을 사용기본 사용법사용할 뷰 선언UISegmentedControl(items: [Any]) 아이템에 무엇을 넣는지가 레이블에 무슨 단어가 들어갈지 결정class ViewController: UIViewController { let segmentedControl: UISegmentedControl = { let control = UISegmentedControl(items: ["One", "Two"]) ..