Apply barrel distortion to UIView

I have a UIScrollview that fills a landscape screen that contains a small UIViews tree around it that I can scroll horizontally. I would like to apply barrel-shaped distortion to the scroll view so that when the subviews are moved outside to the center of the scroll view, they change shape.

What good is applying distortions like this?

Is there a way to override drawRect to represent the scroll view, draw on a bitmap, distort it, and then draw this in a ScrollView context? Or is there a built-in API for such distortion?

barrel distortion
(source: arielnet.com )

+3
source share
1

, UIView. CATransform3D, , . UIView, , , . ( ), , , .

, CALayers.

, , , . , UIScrollViewDelegate, scrollViewDidScroll:, .

+1

Source: https://habr.com/ru/post/1721770/


All Articles