Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animation flickering #3

Open
i-tengfei opened this issue Apr 27, 2022 · 5 comments
Open

Animation flickering #3

i-tengfei opened this issue Apr 27, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@i-tengfei
Copy link

Describe the bug
Button flickering on toggle.

2022-04-28.05.43.04.mov

Environment

  • Xcode [e.g. 13.3.1]
  • Swift [e.g. 5.5]
  • OS: [e.g. iOS Simulator 15]
@fruitcoder
Copy link
Collaborator

Thank you for your feedback! As mentioned in the Note here there can be flickering on the simulator. Can you confirm the bug in a release build on the device?

@i-tengfei
Copy link
Author

After the test, the flickering is more serious on the device.

RPReplay_Final1651694633.MP4

iPhone 12
iOS 15.4

@fruitcoder
Copy link
Collaborator

Do you see the same glitch in the sample code on the device? If not, can you provide a minimal project showing the bug?

@i-tengfei
Copy link
Author

Yes it has the same problem in the sample code.

RPReplay_Final1652051717.mov

And it's easy to reproduce.

import UIKit
import PlayButton

class ViewController: UIViewController {
  lazy var playButton: PlayButton = {
    let playButton = PlayButton()
    playButton.addAction(.init(handler: { [weak self] _ in
      guard let self = self else { return }
      if (playButton.isPlay) {
        playButton.setMode(.pause, animated: true)
      } else {
        playButton.setMode(.play, animated: true)
      }
    }), for: .touchUpInside)
    return playButton
  }()

  override func viewDidLoad() {
    super.viewDidLoad()
    
    view.addSubview(playButton)
    playButton.translatesAutoresizingMaskIntoConstraints = false
    playButton.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
  }
}


fruitcoder added a commit that referenced this issue Nov 7, 2022
@fruitcoder
Copy link
Collaborator

Hi @i-tengfei! Could you test if the latest release fixes the issue?

@fruitcoder fruitcoder added the bug Something isn't working label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants