Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 14, 2018. It is now read-only.
This repository was archived by the owner on Jan 14, 2018. It is now read-only.

Wrong parameter type in tap gesture recognizer action method #456

@tema-orange

Description

@tema-orange

Method resetTopViewAnimated: is passed as an action method in tap gesture recognizer. This method has parameter of type BOOL. But action method must take UIGestureRecognizer as an argument.

// Valid action method signatures:
// -(void)handleGesture;
// -(void)handleGesture:(UIGestureRecognizer*)gestureRecognizer;

This causes gesture recognizer object be casted to boolean, so result of this casting may cause to animated parameter be NO, because of specifics of such cast https://www.mikeash.com/pyblog/friday-qa-2012-12-14-objective-c-pitfalls.html (casting to bool section). So it breaks animation after tap gesture recognizer method fire to close side view controller.

This bug is not usually visible because default animation controller does not handle isAnimated method of transitionContext.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions