-
Notifications
You must be signed in to change notification settings - Fork 119
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
Adding Motion as pod interferes with UIImagePickerController #1
Comments
Thank you! I think Motion will be a good one :) Can you send a sample so I can reproduce? I didn't use the UIImagePicker anywhere, but I could be overriding a delegation binding accidentally. Thank you! |
OK, this was really weird. If I do it like this:
in a local function just before I want to show the picker, it works even with Motion in the Podfile. So, some weird stuff happened when I used Motion and had the declaration in the class header. No idea why, but it works fine with a local variable. |
Too soon...it works as I described above when I start with a new project. When I try the above in my real project, it still doesn't work with Motion in the Podfile... No idea how you can reproduce this, since I cannot send you the whole project. I'll see if I can debug some more. |
I looked through Motion's code and think that this maybe the issue:
extension UIViewController {
open func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return isMotionEnabled ? Motion(isPresenting: true, isContainer: false) : nil
}
open func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return isMotionEnabled ? Motion() : nil
}
open func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? {
return isMotionEnabled ? MotionPresentationController(presentedViewController: presented, presenting: presenting) : nil
}
} Can you try taking that out and see if the issue persists? You may get another issue, but I want to know if the UIImagePickerController works correctly. Thank you! |
No, it didn't help. However, this helps:
|
Yes, the functions are only called when you set that value. I have an idea of how to fix it. I'll push an update to the |
I released Motion 1.0.3, which requires a manual setting for the |
Yep, it works. |
Sweet :) Thanks for bringing this to my attention. |
Motion looks like an awesome library! Playing around with it now, and noticed something.
When adding the pod the delegates of
UIImagePickerControllerDelegate
is not called:and
When removing Motion from the Podfile, the delegates work.
The text was updated successfully, but these errors were encountered: