forked from shadowfacts/Tusker
Fix selecting poll option playing too much haptic feedback
This commit is contained in:
parent
3eceffbb6b
commit
c367a2e9f1
|
@ -153,7 +153,8 @@ class PollOptionsView: UIControl {
|
|||
let location = touch.location(in: self)
|
||||
var newIndex: Int? = nil
|
||||
for (index, view) in options.enumerated() {
|
||||
var frame = view.frame
|
||||
// don't use view.frame because it changes when a transform is applied
|
||||
var frame = CGRect(x: 0, y: view.center.y - view.bounds.height / 2, width: view.bounds.width, height: view.bounds.height)
|
||||
if index != options.count - 1 {
|
||||
frame = frame.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: -stack.spacing, right: 0))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue