Как я могу создавать такие анимации или пользовательские переходы в виде прокрутки.Вы можете увидеть ожидаемую анимацию в GIF: https://gfycat.com/EveryBackLhasaapso
Ожидается:
При длительном нажатии на просмотре прокрутки, оно должно быть расширено, как анимация GIF, а значок также должен получить zoomin.
Я пытался добиться этого с помощью прокрутки, но анимация не соответствует ожидаемой.
UIView.animate(withDuration: 0.2, delay: 0.2, usingSpringWithDamping: 0.5, initialSpringVelocity: 1, options: .curveEaseInOut, animations: {
self.scrollViewHeight.constant = isExpanded == true ? ViewConstants.collectionViewHeightWithExpand : ViewConstants.collectionViewHeightWithcollapse
self.scrollContentViewHeight.constant = isExpanded == true ? ViewConstants.collectionViewHeightWithExpand : ViewConstants.collectionViewHeightWithcollapse
self.scrollContentView.transform = isExpanded == true ? CGAffineTransform(scaleX: 1.20, y: 1.20) : CGAffineTransform.identity
self.view.layoutIfNeeded()
}) { _ in}