Warning while implementing method from UICollisionBehaviorDelegate
| Originator: | mayoralito | ||
| Number: | rdar://34752088 | Date Originated: | 09/29/2017 |
| Status: | Open | Resolved: | |
| Product: | Xcode | Product Version: | 8.3.3 (8E3004b) |
| Classification: | Warning | Reproducible: | All times |
Warning and malfunction using UICollisionBehaviorDelegate.
Basic example can be found here: https://gist.github.com/mayoralito/2162a1b94bf6d311912c6f53a71911f9
Add a UIViewController then define two variables; one for UIDynamicAnimator and another one for UICollisionBehavior. Set collisionDelegate for UICollisionBehavior and extend UICollisionBehaviorDelegate.
Inside of the extension definition add one of the optional methods like so
func collisionBehavior(_ behavior: UICollisionBehavior, beganContactFor item: UIDynamicItem, withBoundaryIdentifier identifier: NSCopying?, at p: CGPoint) {}
Expected Results:
Delegate method should be called and no warning should be prompted.
Actual Results:
Delegate method is not getting called and a warning indicating that "Instance method ... nearly matches optional requirement..."
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!