런루프는 1초에 60번 화면을 그리게 되는데,
func에 layoutIfNeeded()를 추가해주면 지금 바로 화면을 그려줌
UIView.animate(withDuration: 0.3) {
self.view.layoutIfNeeded()
}'PROGRAMMING CODE > SWIFT' 카테고리의 다른 글
| [Xcode] Tuist 개념들 (0) | 2023.11.22 |
|---|---|
| [UIkit] selector, 함수 전달할 때 @objc를 붙이는 이유 (0) | 2023.11.20 |
| [UIkit] 'self' refers to the method 'ViewController.self', which may be unexpected (self 사용 시점) (0) | 2023.11.20 |
| [Xcode] code snippet 자동완성 설정하기 (0) | 2023.11.19 |
| [UIkit] Unable to activate constraint with anchors 오류 (0) | 2023.11.19 |