TIL16 ✨

YaR Lab·2023년 5월 15일
0

TIL✨

목록 보기
6/135
post-thumbnail

23.05.15

피곤할때 일어나는시간이 같으면 좋다(수면의 질이 중요하다) feat.dasan

@IBOutlet

UI Component의 값을 가져오고 싶을때 사용

@IBAction

UI Component가 event가 생길때 반응하기 위해 사용

Event Driven Programming

사용자 Action 기반 코드, 프로그래밍

slider

UIKit 컴포넌트 중 하나

.value property 슬라이더의 값을 가져옴

Lable font

system font로 폰트사이즈를 고정해놓으면 사용자가 사이즈 조작시 잘 조정되지 않는다.

Asset Catalog

여러 해상도에 따라 사용할 이미지가 다르기 때문에

Auto Layout

다양한 환경, 기기에 맞추기 위해서 constraint 제약이 중요

alert

addAction <- alert의 선택보기 추가
present <- alert 알람

func showAlert(message: String) {
        let alert = UIAlertController(title: nil,
                                      message: message,
                                      preferredStyle: .alert)
        
        let okAction = UIAlertAction(title: "OK",
                                     style: .default) { (action) in self.reset()}
    
        alert.addAction(okAction)
        present(alert,
                animated: true,
                completion: nil)
    }

textView

글이 길어지면 자동으로 스크롤이 생김
줄바꿈: option + enter
선택 가능/불가: Selectable

textField

한 줄에만 입력받게 구현

0개의 댓글