andreamazz/BubbleTransition

Black background color on dismiss transition (Objective-C only)

slxl opened this issue ยท 26 comments

slxl commented
func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
    transition.transitionMode = .Dismiss
    transition.startingPoint = transitionButton.center
    transition.bubbleColor = transitionButton.backgroundColor!
    return transition
}

ios simulator screen shot 25 2015 19 40 51

Demo project, tested on simulator iOS8.3/iOS8.4 and on iPhone 5s iOS8.4

Tested now, it's working fine. I did a fresh clone also, just to be sure.
Which version of Xcode are you using?

slxl commented

Version 6.4 (6E35b)

Yup, same version here, no issues.

slxl commented

What environment (iOS version, device/simulator) do you use?

8.4 on an iPhone 5s as you suggested above.

slxl commented

looks like I found, problem was with a setting for segue presentation (full screen instead of default in project), pardon, my fault

No problem ๐Ÿ‘

slxl commented

thanks for tool!

๐Ÿ‘

slxl commented

@andreamazz problem still persists (but in my project only), looks like its something similar to what google returns for "dismiss modal view controller black screen" request, still looking for solution :/

all presentation settings and stuff are (i hope) identical, the only significant difference is that im using your BubbleTransition.swift in objective-c project. But I think that shouldnt be a problem

Can you share the code or reproduce part of it in a stand alone project? I'll be happy to take a look at it.

slxl commented

I found solution here:
http://www.raywenderlich.com/forums/viewtopic.php?f=2&t=18661

Add this code in prepareForSegue:

UIViewController *controller = segue.destinationViewController;

if (SYSTEM_VERSION_LESS_THAN(@"8.0")) {
} else {
    controller.modalPresentationStyle = UIModalPresentationOverCurrentContext;

}
slxl commented

@andreamazz Despite being slowpoke, but I'm responsible also :)

https://dl.dropboxusercontent.com/u/18509214/TransitionTest.zip

here is a template project with a same structure as mine original. Would be great if you' have a look whats wrong there. Thanks! )

slxl commented

@andreamazz had a time to look?

Not yet, sorry, I'll get around it this weekend.

slxl commented

@andreamazz appreciate this, thanks! I tried few approaches already, we could discuss in skype if you want (id: slxl.ru)

Well, I'm confused.
This is the view hierarchy in the sample:
screen shot 2015-09-27 at 19 15 27

You can see the starting view.
This is the hierarchy of your sample:

screen shot 2015-09-27 at 19 14 52

The starting view is not in the hierarchy, that's why you see a black screen during the transition.
Can't figure out why...

Ok, I started a new project, dropped in the animation, and I have the same issue. wth...

The same sample written in Swift works fine. Awesome.

Objective-C sample: http://d.pr/f/1fsLx

Swift sample: http://d.pr/f/1aNFW

slxl commented

@andreamazz good news everyone!

somehow in both (yours and mine) projects there was

controller.modalTransitionStyle = UIModalPresentationCustom; // incorrect

instead of

controller.modalPresentationStyle = UIModalPresentationCustom; // correct

thanks to apple developer's support )

Sneaky! Glad that this wasn't related to the lib itself.
Thanks for solving the mystery @slxl ๐Ÿ‘

Cheers

slxl commented

i'd say, glad it wasn't related to Obj-C :)

That would have been awkward ๐Ÿ˜ฌ

This fixed for me, using
controller.modalPresentationStyle = UIModalPresentationCustom;
instead of
controller.modalTransitionStyle = UIModalPresentationCustom; // incorrect

fyi.
(I'm on a objc project btw.)