How to Iisten to UIView changes made by an itemBehavior like UISnapBehavior

时间:2015-10-06 08:19:38

标签: ios swift animation uikit uikit-dynamics

I want to darken the background color of a view depending on the position of the view.

I darken the view using a gesture recognizer, when dragging to the right it gets darker by subclassing the UIView and overriding the layoutSubviews method. But if I don't drag all the way the view snaps to the right. In that snapping layoutSubviews doesn't get called.

Is there a solution to respond to each frame of the snapping behavior or something similar?

Thanks.

0 个答案:

没有答案