
1. 스토리 보드에 스크롤뷰 추가 (cmd + shift + L) - 자동으로 content Layout Guide와 Frame Layout Guide가 생성됨 2. 스크롤뷰의 크기 조정 (view의 크기와 동일하게 설정) 3. contentView를 추가 (cmd + shift + L을 통해 UIView를 추가) (1) 추가한 view를 선택하고, control을 누른 상태로 content Layout Guide로 드래그 한 뒤 아래 4항목에 체크 - Leading Space to Content Layout Guide - Top Space to Content Layout Guide - Trailing Space to Content Layout Guide - Bottom Space to Content L..
X축 Anchor Y축 Anchor 예시 - UIView 클래스에 usernameTextField 변수를 선언하여 autoLayout 잡는 상황 - 가시성을 위해 UIView는 노랑색, usernameTextField는 파란색으로 설정 func setLayout() { addSubview(usernameTextField) NSLayoutConstraint.activate([ usernameTextField.topAnchor.constraint(equalToSystemSpacingBelow: topAnchor, multiplier: 1), usernameTextField.leadingAnchor.constraint(equalToSystemSpacingAfter: leadingAnchor, multiplie..

다음 앱 만들기 주제가 전광판 앱 만들기인데요. 이걸 하려면 Delegate Pattern을 이해해야 하더라구요. 그래서 간단하게 만들어 본 Delegate Pattern 예제에욧. 두 번째 화면의 TextField에서 입력한 내용이 첫 번째 화면의 Label에 출력되쥬? Delegate Pattern을 이용하여 화면 간 전달을 해볼게요. 오늘도 기본적인 UI를 잡는 코드는 숨겨둘게요. 더보기 첫 번째 화면은 네비게이션컨트롤러를 Embed in 했습니다! import UIKit class FirstViewController: UIViewController { let myLabel = UILabel() let myButton = UIButton() override func viewDidLoad() { su..

[swift] App의 LifeCycle (1) ⬇️⬇️⬇️ 더보기 https://day-of-soonjin.tistory.com/48 [swift] App의 LifeCycle 지난 번에는 ViewController의 life cycle에 대해서 공부해 봤는데요!! 오늘은 App의 Life Cycle에 대해서 공부해보려구요! 사실 ViewController의 라이프 사이클과 유사할 거라 생각하고 시작했는데, 생각보다 day-of-soonjin.tistory.com 지난 번에는 WWDC2019에서 발표된 내용에 따라 AppDelegate와 SceneDelegate와 역할 및 LifeCycle을 보았었는데요! 오늘은 scene의 상태 변화(state transition)에 대해 알아보고, 실제 앱에서 실행하..

새롭게 배운 "xcode에 폰트 추가하기"를 써보면 좋을 것 같아서요. 우선 폰트를 다운받아야겠쥬? 구글 폰트에요. 여기서 다양한 필터를 설정해서 다운받을 수 있어요! https://fonts.google.com Google Fonts Making the web more beautiful, fast, and open through great typography fonts.google.com 저는 SongMyung이라는 폰트를 다운 받았어요. 예뻐요 ㅎㅎ https://fonts.google.com/specimen/Song+Myung?subset=korean Google Fonts Making the web more beautiful, fast, and open through great typography..

지난 번에는 ViewController의 life cycle에 대해서 공부해 봤는데요!! 오늘은 App의 Life Cycle에 대해서 공부해보려구요! 사실 ViewController의 라이프 사이클과 유사할 거라 생각하고 시작했는데, 생각보다 어렵더라구여 ㅠㅠ (많이 틀렸을 수도 있음 주의 ㅠㅠ) xcode에서 프로젝트를 만들면 자동으로 생기는 AppDelegate.swift와 SceneDelegate.swift 파일이 기억나시나요? 이게 이게 iOS13부터 생긴 놈이더라구요. iOS12 및 그 이전에는 하나의 앱은 하나의 윈도우만 가졌기 때문에 AppDelegate가 앱에 관한 모든 걸 좌지우지 했대요. (윈도우는 그냥 단순하게 화면이라고 생각하면 좋을 것 같아요) 그래서 AppDelegate.swif..

오늘도 Udemy 강의에서 배운 ViewController의 Lifecycle을 알아볼게요. (Udemy 못 잃어,,,) 일단 ViewController의 life는 아래와 같이 돌아간다고 해요. (역시 오타 안나면 내가 아니지,,,viewWillDisappear이에여 ㅎㅎㅎ) 하나씩 차근차근 알아볼게용 🤡 viewDidLoad() - 우리가 익숙한 건 모다? viewDidLoad()져! - view가 메모리에 로드된 후에 불려지는 인스턴스 메서드입니다. - viewDidLoad()는 view가 생성될 때 딱 한 번 불려지게 됩니다. viewWillAppear() - viewDidLoad() 실행 후 불려지는 메서드에요. - 뷰가 실제로 스크린에 나타나기 직전에 불려진답니다. - 유저가 아직 아무것도 볼..

x-code view as 부분에서 Appearance 부분을 보신 적 있으신가요? 왼쪽은 light mode, 오른쪽은 dark mode로 볼 수 있는 부분이에요. 사실 저도 한 번도 안 써봤지만, 이번 주 유데미 강의를 들으면서 배웠기 때문에 (+ 생각보다 쉬웠기 때문에) 정리하고자 한 번 냄겨봅니당! 참고로 이번 프로젝트에서는 pdf로 배경 이미지를 설정해요! 우선 Assets 폴더로 가주신 후에 background를 선택해주세요! 1. 이번 배경 이미지는 pdf 파일이기 때문에, Preserve Vector Data 항목을 체크해줍니다요. 2. Apperance를 'Any, Light, Dark'로 설정해주고 3. Scales 또한 'Single Scale'로 설정해줘요. 저는 vector 파일이..
- Total
- Today
- Yesterday