andreamazz / BubbleTransition

A custom modal transition that presents and dismiss a controller with an expanding bubble effect.
MIT License
3.32k stars 250 forks source link

It is possible to use this library to add child view controller to a container view? #58

Closed Senocico closed 4 years ago

Senocico commented 5 years ago

I want to add as a child view controller to a container view; is this possible? Because when present a view controller it is displayed on the top above all the other content.

andreamazz commented 5 years ago

Never tried, if you can concoct a quick sample project I'd be happy to take a look at it.

Senocico commented 5 years ago

QIOZ.zip

Thank you for the quick answer. I attached a project.

Go to the TabBarVC file, comment line 129, and uncomment the line 130. I want the tab bar view to be visible when another controller is added to the self.containerView.

Thank you for your interest!

andreamazz commented 5 years ago

Hi @Senocico I've taken a look at the project, and I don't think it's something that I can integrate in the library, the best course of action is to take part of the transition code and integrate it in your own app directly. Mainly you'll need to take this part: https://github.com/andreamazz/BubbleTransition/blob/master/Source/BubbleTransition.swift#L197-L222 and adapt it to your view's frames in your addChildVC method. On animation completion you an call the didMove(toParent:) method.

Senocico commented 5 years ago

Thank you for your suggestion! I will do so.