Skip to content

EasyAnimation breaks popover presentation animation #14

Description

@jbeachwood

Adding EasyAnimation to a project breaks the presentation animation for a UIPopoverController, whether being used explicitly with UIViewController and a UIPopoverController, or implicitly by setting the modalPresentationStyle for a UIViewController to UIModalPresentationStylePopover and setting a sourceView and sourceRect. The popover still animates into place but various elements of the popover are out of place until they finish animating, and the dimmed out background view jumps up into place.

I have been able to consistently replicate this with EasyAnimation 0.7 + 1.0 with the following steps:

  • Create a new project and add EasyAnimation via CocoaPods. Open the new workspace.
  • Add a button to the storyboard for the default ViewController class.
  • Add a IBOutlet for a UIButton:
    @IBOutlet private weak var button: UIButton!
  • Add the following IBAction:
    @IBAction func buttonPressed(sender: UIButton) {
        let alertController = UIAlertController(title: "Test", message: "test", preferredStyle: UIAlertControllerStyle.ActionSheet)
        alertController.modalPresentationStyle = UIModalPresentationStyle.Popover
        alertController.popoverPresentationController?.sourceView = self.view
        alertController.popoverPresentationController?.sourceRect = self.button.frame
        self.presentViewController(alertController, animated: true, completion: nil)
    }
  • Connect the UIButton in the storyboard to the outlet and the action.
  • Run and tap on the button to observe the broken animation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions