일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- github
- appstore
- UIButton
- Session
- JPA
- 개발자
- geofencing
- Apple
- iOS16
- darkmode
- view
- Code
- FLUTTER
- IOS
- MacOS
- Realm
- 이미지
- window
- Xcode
- 한글
- Swift
- Git
- error
- SwiftUI
- Firebase
- 웹뷰
- mac
- Notification
- rxswift
- Archive
- Today
- Total
목록Animation (4)
EEYatHo 앱 깎는 이야기

tableView.reloadRows(at: [indexPath], with: .none) 해당 코드에서, witth부분(애니메이션부분)은, none을 제공하고 있지만, 실제는 automatic과 동일하게 작동한다 ㅡㅡ 일해라 애플.... 애니메이션 없이 reloadRows를 하고 싶다면, 애니메이션들을 명시적으로 비활성화 할 수 있는 UIView.performWithoutAnimation를 사용하면 된다. UIView.performWithoutAnimation { tableView.reloadRows(at: [indexPath], with: .none) }
var myButton = UIButton(type: .system) ... myButton.setTitle("text", for: .normal) ... myButton.setTitle("text2", for: .normal) 위와 같이 .system 타입으로 선언한 버튼에, 두번째 setTitle을 하게 되면, 버튼의 텍스트들이 천천히 사라졌다가 나타나는 애니메이션이 적용됩니다. 이런 애니메이션을 원하지 않을 경우, var myButton = UIButton(type: .system) ... myButton.setTitle("text", for: .normal) ... UIView.setAnimationsEnabled(false) myButton.setTitle("text2", for: .normal..
콜렉션뷰를 유저가 스와이프할 때, 어떤 위치의 아이템을 보여줄지 알아내는 소스 func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer) { // 스와이프시 애니메이션 끝날 떄 위치를 미리 알 수 있음 let index = Int(targetContentOffset.pointee.x / view.frame.width) ... }

디자인팀의 요구사항은, 올라왔다가 내려가는 Toast. Frame으로 Animate하는거야 뭐 아주 쉽다. 그런데 Label의 줄 수에 따라 동적으로 높이가 변하는 Toast. 때문에 FrameBasedLayout이 아닌, AutoLayout을 사용한다. AutoLayout Animate로 리서칭을 하였는데, animate 밖에서 Constraint 수정하고, animate 안에서 layoutIfNeeded() 하기? 잘 안되면 setNeedsUpdateConstraints() 하기? 다 필요없다 animate 함수 안에 아래처럼만 해주면 된다. 갓갓 SnapKit.. ( 진작에 SnapKit Animate로 검색할걸 ㅇㄴㅁㄹㄴㅁㅇㅁㄹㅁㄴ ) UIView.animate(withDuration: 1.0, ..