Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Protocol
- UITextView
- combine
- Human interface guide
- clean architecture
- Observable
- swiftUI
- tableView
- uitableview
- rxswift
- uiscrollview
- HIG
- Xcode
- collectionview
- map
- 리팩토링
- Refactoring
- SWIFT
- 리펙토링
- Clean Code
- ribs
- 클린 코드
- MVVM
- swift documentation
- ios
- 리펙터링
- UICollectionView
- 스위프트
- RxCocoa
- 애니메이션
Archives
- Today
- Total
김종권의 iOS 앱 개발 알아가기
[iOS - swift] 포커스 애니메이션 본문
화면을 탭 할 경우 초점 애니메이션
- UIImageView라는 임의의 뷰를 생성하여 애니메이션이 시작 시 addSubviews 후 끝날 때 removeFromSuperview()
extension UIView {
func focusAnimationAt(_ point: CGPoint) {
let focusView = UIImageView(image: UIImage(systemName: “포커스 사진 이름“))
focusView.center = point
focusView.alpha = 0.0
view.addSubview(focusView)
UIView.animate(withDuration: 0.25, delay: 0.0, options: .curveEaseInOut, animations: {
focusView.alpha = 1.0
focusView.transform = CGAffineTransform(scaleX: 1.25, y: 1.25)
}) { (success) in
UIView.animate(withDuration: 0.15, delay: 0.5, options: .curveEaseInOut, animations: {
focusView.alpha = 0.0
focusView.transform = CGAffineTransform(translationX: 0.6, y: 0.6)
}) { (success) in
focusView.removeFromSuperview()
}
}
}
}
'iOS 응용 (swift)' 카테고리의 다른 글
[iOS - swift] Localization, Localizable, 지역화 테스트 방법 (Programmtically, Storyboard, xib) (1) | 2021.01.11 |
---|---|
[iOS - swift] Floating Button (Hover 프레임워크) (0) | 2021.01.11 |
[iOS - swift] UIImage파일 관리 방법 (0) | 2021.01.10 |
[iOS - swift] UIView.animate() (0) | 2021.01.09 |
[iOS - swift] ContainerViewController, ContentsViewController (0) | 2021.01.09 |
Comments