andreamazz / bubbletransition Goto Github PK
View Code? Open in Web Editor NEWA custom modal transition that presents and dismiss a controller with an expanding bubble effect.
License: MIT License
A custom modal transition that presents and dismiss a controller with an expanding bubble effect.
License: MIT License
i want this in my navigation controller
Is there anyway to make it support SpriteKit and scenes?
what should I do if I want to have dismiss direction for presenting non modal controller?
BubbleTransition (~> 1.0.0)
required by Podfile
Specs satisfying the BubbleTransition (~> 1.0.0)
dependency were found, but they required a higher minimum deployment target.
I came across this error when i was trying to install in through cocoa pods
My minimum deployment target is 9.0
Hi!
Your work is amazing however, i am not into Swift.
I imported your file, created the necessary bridging header and everything compiles, however i don't know how to "activate" the transition and use the delegates. Could you please provide an objective-c example?
Thanks in advance.
Hi, thanks for sharing the great work.
It works well on my project, but my project needs the ability to keep accepting gestures of the user, wondering if this can be done with Bubble Transition?
You may have to update your pods.
I use your beautiful control but when you make a presentation to a view controller with autorotate the rotation misses
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
}
-(BOOL)shouldAutorotate {
return YES;
}
Can you give me a idea to get this done please?
After adding your Framework in "Linked Frameworks and Libraries" I did following:
Could it be related to the BubbleTransition.framework.dSYM file?
I found following Issue @Carthage that could be useful: Carthage/Carthage#507
Hello,
I came across an issue where I refactored my storyboard and am using a storyboard reference. My segue is identical to what it was when I had my VCs in the same storyboard and the transition worked.
Now the bubble transition is not honored and the segue is performed as a regular modal . prepareForSegue is being called and has the following:
if segue.identifier == "FeedbackSegueIdentifier" {
let controller = segue.destination
controller.transitioningDelegate = self
controller.modalPresentationStyle = .custom
}
With the new storyboard reference I have tried two options
Both ignored the transition
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.
Hi,
First of all thanks for the awesome library
I have added a button and tableview in the presented view. But the button clicks or tableview cell selection are not working.
Hi,
When I touch my button with BubbleTransition initiated, there is the bubble animation and it presents the source ViewController and destination ViewController at the same time. Any idea? Thanks.
Hi,
I'm running into a problem where transitioningDelegate is set the VC is presented with the custom transition but at some point, the transitioningDelegate is nil and so when its dismissed, the transition is the regular dismiss one.
I understand that transitioningDelegate is a weak property but the VC is not deinit'd as I retain a reference to it in my presenting VC
Note 1: when I check transitioningDelegate in the viewDidLoad() of the presented VC, its the assigned BubbleTransitionDelegate class as expected, but when I'm about to dismiss it, transitioningDelegate is nil
Note 2: the only thing I can think of that I'm doing differently, is that I'm extending UIViewController to have a new present(bubble VC)() method as such:
extension UIViewController {
func present( bubble viewController: UIViewController, from target: UIView?, presentingColor: UIColor = OMColor.red, dismissingColor: UIColor = OMColor.white, completion: (() -> ())?) {
let bubbleTransitionDelegate = BubbleTransitionDelegate(target: target, presentingColor: presentingColor, dismissingColor: dismissingColor)
viewController.transitioningDelegate = bubbleTransitionDelegate
viewController.modalPresentationStyle = .custom
self.present(viewController, animated: true) {
completion?()
}
}
}
especially at this part transition.startingPoint = transitionButton.center
Thanks to the author for the great library, very easy to use, however
I can not run the dismissal effect on ios 9.3 and ios 12. Please check again.
Thank you.
Thanks for this library! But after I added it to my project using cocoapods, I can't use BubbleInteractiveTransition class. However, I can use BubbleTransition. And I checked "BubbleTransition.swift" file, it seems that there is no BubbleInteractiveTransition class at all. I don't why this happens.
Because newVC.modalPresentationStyle = .custom
so, Is not working
override var preferredStatusBarStyle: UIStatusBarStyle {
if #available(iOS 13.0, *) {
return .darkContent
} else {
return .default
}
}
If oldVC and NewVC have different status bar styles, What should I do?
In the demo, the action is directly binding to the storyboard, but when I try to self.present new viewcontroller, the bubble transition won't work, what should I do?
Thanks
Hello,
First of all, thank you for sharing your work, it's great!
I would like to know if you ever considered adding an optional UIImage to be used as a bubble background?
It would be a nice improvement I feel.
Cordially,
Hello @andreamazz ,
First of thanks for the great work. Library works awesome.
I'm not sure if my problem is directly linked to bubbleTransition, but I'm noticing a lag on the FIRST button press. From there on after, its smooth as butter.
Note: The startingPoint is incorrect because it appears somewhere on the top though I don't think its CGPointZero but a little under the navigation bar and centered horizontally. This is weird because I specified it as below and that button is at the bottom of the screen. I'm not sure if the button lagged without bubbleTransition.
@IBOutlet var starButton: SpringButton!
I create the segue using storyboard and just do:
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "feedback" {
let controller = segue.destinationViewController
controller.transitioningDelegate = self
controller.modalPresentationStyle = .Custom
}
}
extension ViewController: UIViewControllerTransitioningDelegate {
func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
transition.transitionMode = .Present
transition.startingPoint = starButton.center
transition.bubbleColor = UIColor(red: 245.0/255.0, green: 192.0/255.0, blue: 24.0/255.0, alpha: 1)
return transition
}
func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
transition.transitionMode = .Dismiss
transition.startingPoint = starButton.center
transition.bubbleColor = UIColor(red: 245.0/255.0, green: 192.0/255.0, blue: 24.0/255.0, alpha: 1)
return transition
}
}
Now Swift4 has changed the way that Objective-C is called, there needs to be a very minor change to this library.
@objc needs to be added before all of the open vars.
Good
I updated the Source Code to Swift 3 but the problem is that the Bubble Transition not working anymore for me :( .
please
The warning "The unbalanced calls to begin/end appearance transitions" seems to occur on my UINavigationViewController when i tries to present another controller.
Are you considering uploading Objective-C code of this transition?
Looks fantastic, by the way!
func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
transition.transitionMode = .Dismiss
transition.startingPoint = transitionButton.center
transition.bubbleColor = transitionButton.backgroundColor!
return transition
}
Demo project, tested on simulator iOS8.3/iOS8.4 and on iPhone 5s iOS8.4
How do I call the transition? I am creating buttons dynamically (in the code) so how do I attach it?
When using navigation bar with Translucent = False the starting point of the animation is calculated wrong.
Check the following video:
https://streamable.com/gs9rn
Check my forked repo to reproduce:
https://github.com/Alexookah/BubbleTransition
changes:
i added a navigation controller as initial vc and changed the translucency in the navigation Bar.
how can i use with multiple button with difference location?
Is there a way to swipe down to dismiss the ModalViewController? If so, how can this be done? Can that be added in a next update? Please let me know, thanks!
Hi,
I noticed that the instructions for installing via Cocoapods isn't correct. When using pod 'BubbleTransition', '~> 1.0.0'
in a podfile and then doing pod install
in the terminal, it pulls an older version written in Swift 2.2. But if I do pod 'BubbleTransition', :git => 'https://github.com/andreamazz/BubbleTransition.git'
, it pulls the master branch with has the lastest changes in Swift 3.0. Was wondering if it was setup like that on purpose?
It shows Shell in my starred page
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.