zoonooz / ZFRippleButton

Custom UIButton effect inspired by Google Material Design
MIT License
1.41k stars 110 forks source link

Fix bug: Autolayout causes the wrong center position of ripple view. #12

Closed ronaldmak closed 9 years ago

ronaldmak commented 9 years ago

This bug occurs under the following conditions:

  1. Autolayout is used. (I use Stack View.)
  2. Track touch location is off or default.

In event "layoutSubviews()", the old rippleView.center is kept in order to get touch location from event "beginTrackingWithTouch" when track touch location is enabled. However the center position is always changed when auto layout is used. When track touch location is off, the wrong center position is kept.

zoonooz commented 9 years ago

@ronaldmak Thanks!