Today I want to show how to use the GravitySDK 🚀 (as discussed in the previous post) to make an animated bubbles buttons that falling around with gravity, like this:
Swift – Circular button bubbles with gravity
![](<480:https://i0.wp.com/www.albertopasca.it/whiletrue/wp-content/uploads/2021/11/Simulator-Screen-Shot-iPhone-13-Pro-2021-11-23-at-09.35.38-1.png?resize=150%2C150&ssl=1, <768:https://i0.wp.com/www.albertopasca.it/whiletrue/wp-content/uploads/2021/11/Simulator-Screen-Shot-iPhone-13-Pro-2021-11-23-at-09.35.38-1.png?fit=230%2C300&ssl=1, >768:https://i0.wp.com/www.albertopasca.it/whiletrue/wp-content/uploads/2021/11/Simulator-Screen-Shot-iPhone-13-Pro-2021-11-23-at-09.35.38-1.png?fit=231%2C301&ssl=1)
Today I want to show how to use the GravitySDK 🚀 (as discussed in the previous post) to make an animated bubbles buttons that falling around with gravity, like this:
Sometimes can be useful to add a gradient on a UIView. This simple UIView extension helps you “coloryze” your screen.
Let see how to use and how is implemented.
Read MoreSimple code snippet today that show how to push a UIView
and obtain the same effect of a UINavigationController
as push action, choosing also the side (.fromLeft
/ .fromRight
).
We can do this using the CATransition
animations. Very simple:
func push( view: UIView, side: CATransitionSubtype = .fromRight ) {
let transition = CATransition()
transition.type = CATransitionType.push
transition.subtype = side
self.layer.add(transition, forKey: nil)
self.addSubview(view)
}
Enjoy pushing!
A simple memo to draw a matrix on a view, based on view size.
Read MoreToday, how to make a 3d rotation using two UIView.
I want to rotate my view in 3d perspective, but after animation, buttons not responds to touch events.
This happens because after a 3d trasform, the point of view is different, and the frame go out for a walk…
Nuova versione, del 5/12/2012: