Convert Figma logo to code with AI

Yalantis logoEuclid

User Profile Interface Animation

2,230
554
2,230
3

Top Related Projects

:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion

:octocat: ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion

:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion

:octocat: PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion

:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion

Quick Overview

Yalantis/Euclid is an iOS animation library that provides smooth and customizable animations for expanding and collapsing views. It offers a unique and visually appealing way to reveal additional content or options in iOS applications, enhancing the user experience with elegant transitions.

Pros

  • Easy to implement and integrate into existing iOS projects
  • Highly customizable animations with various options for timing, direction, and style
  • Smooth and performant animations that enhance the overall user experience
  • Well-documented and maintained by an active community

Cons

  • Limited to iOS platform, not available for Android or web applications
  • May require additional effort to adapt to complex UI layouts or custom designs
  • Potential performance impact on older devices if overused or not optimized properly
  • Learning curve for developers unfamiliar with custom animation libraries

Code Examples

  1. Basic usage of Euclid to expand a view:
let expandingView = ExpandingView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
expandingView.frontView = UIView()
expandingView.backView = UIView()
view.addSubview(expandingView)

expandingView.expand(nil)
  1. Customizing the animation duration and timing:
expandingView.animationDuration = 0.5
expandingView.animationTimingFunction = CAMediaTimingFunction(name: .easeInEaseOut)
expandingView.expand(nil)
  1. Adding a completion handler to the animation:
expandingView.expand { finished in
    if finished {
        print("Expansion animation completed")
    }
}

Getting Started

To use Euclid in your iOS project:

  1. Add the following to your Podfile:

    pod 'Euclid'
    
  2. Run pod install in your terminal.

  3. Import Euclid in your Swift file:

    import Euclid
    
  4. Create an instance of ExpandingView and customize it:

    let expandingView = ExpandingView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
    expandingView.frontView = YourFrontView()
    expandingView.backView = YourBackView()
    view.addSubview(expandingView)
    
  5. Trigger the expansion animation:

    expandingView.expand(nil)
    

Competitor Comparisons

:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion

Pros of folding-cell

  • More versatile animation options, allowing for complex folding effects
  • Supports both Swift and Objective-C, providing wider compatibility
  • Includes a demo app for easy testing and implementation

Cons of folding-cell

  • More complex implementation compared to Euclid's simpler approach
  • Requires more setup and configuration to achieve desired effects
  • May have a steeper learning curve for beginners

Code Comparison

folding-cell:

let cell = FoldingCell()
cell.itemCount = 4
cell.backViewColor = .blue
cell.foregroundView = customView
cell.setup(frame: frame)

Euclid:

let animation = EuclidAnimation(type: .rotation)
animation.duration = 0.5
animation.fromValue = 0
animation.toValue = CGFloat.pi
view.euclidAnimate(animation)

Both libraries offer unique animation capabilities for iOS applications. folding-cell provides more complex folding animations with greater customization options, while Euclid focuses on simpler, more straightforward animations. The choice between the two depends on the specific requirements of your project and the level of animation complexity needed.

:octocat: ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion

Pros of expanding-collection

  • More advanced and visually appealing animations
  • Supports both portrait and landscape orientations
  • Includes a demo app for easy testing and implementation

Cons of expanding-collection

  • More complex implementation due to advanced features
  • Requires iOS 9.0 or later, limiting compatibility with older devices
  • Larger file size and potentially higher resource usage

Code Comparison

expanding-collection:

let expandingCollection = ExpandingCollection(cells: cells)
expandingCollection.cellSize = CGSize(width: 250, height: 350)
expandingCollection.delegate = self
view.addSubview(expandingCollection)

Euclid:

let euclid = Euclid(frame: view.bounds)
euclid.dataSource = self
euclid.delegate = self
view.addSubview(euclid)

Both repositories provide iOS UI components for creating interactive and visually appealing collection views. Expanding-collection offers more advanced animations and features, but at the cost of increased complexity and resource requirements. Euclid, on the other hand, is simpler to implement and has broader device compatibility. The code comparison shows that expanding-collection requires more configuration, while Euclid has a more straightforward setup process. Developers should choose based on their project's specific needs and target audience.

:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion

Pros of animated-tab-bar

  • More customizable animations and transitions
  • Supports both Swift and Objective-C
  • Actively maintained with recent updates

Cons of animated-tab-bar

  • Larger file size and potentially higher memory usage
  • Steeper learning curve for implementation
  • Limited to tab bar animations only

Code Comparison

animated-tab-bar:

let animatedTabBar = RAMAnimatedTabBarController()
let item1 = RAMAnimatedTabBarItem(title: "Home", image: UIImage(named: "home"), tag: 1)
item1.animation = RAMBounceAnimation()
animatedTabBar.viewControllers = [homeVC]
animatedTabBar.setViewControllers([homeVC], animated: true)

Euclid:

let button = EUButton(size: .small)
button.setTitle("Button", for: .normal)
button.setTitleColor(.white, for: .normal)
button.backgroundColor = .blue
view.addSubview(button)

Summary

animated-tab-bar focuses specifically on tab bar animations with a wide range of customization options, while Euclid provides a broader set of UI components. animated-tab-bar offers more complex animations but may require more resources and setup time. Euclid, on the other hand, provides simpler implementations for various UI elements, making it easier to use for general interface design. The choice between the two depends on the specific needs of your project and the desired level of animation complexity.

:octocat: PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion

Pros of paper-onboarding

  • More recent updates and active maintenance
  • Supports both Swift and Objective-C
  • Includes a demo app for easy testing and implementation

Cons of paper-onboarding

  • Limited to onboarding screens, less versatile than Euclid
  • Fewer stars and forks on GitHub, potentially indicating less community adoption
  • Documentation is less comprehensive compared to Euclid

Code Comparison

Euclid (Objective-C):

EUCAnimationController *animationController = [EUCAnimationController new];
animationController.duration = 0.8;
animationController.presenting = YES;
animationController.animationType = EUCAnimationTypeCircle;

paper-onboarding (Swift):

let onboarding = PaperOnboarding()
onboarding.dataSource = self
onboarding.delegate = self
view.addSubview(onboarding)

Both libraries offer simple implementation, but paper-onboarding's code is more concise and modern due to its Swift support. Euclid provides more animation options, while paper-onboarding focuses specifically on onboarding flows.

paper-onboarding is ideal for projects requiring quick and easy onboarding screen implementation, whereas Euclid offers more flexibility for various custom animations and transitions throughout an app.

:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion

Pros of circle-menu

  • More customizable appearance with options for button colors, icons, and animations
  • Supports both Swift and Objective-C
  • Includes a demo app for easy testing and implementation

Cons of circle-menu

  • Limited to circular menu layout, less flexible than Euclid's grid-based approach
  • Fewer stars and forks on GitHub, potentially indicating less community support
  • Last updated in 2019, while Euclid was updated more recently

Code Comparison

circle-menu implementation:

let circleMenu = CircleMenu(
    frame: view.bounds,
    normalIcon:"icon_menu",
    selectedIcon:"icon_close",
    buttonsCount: 4,
    duration: 4,
    distance: 120)
view.addSubview(circleMenu)

Euclid implementation:

let buttonViewController = ButtonViewController()
buttonViewController.delegate = self
buttonViewController.dataSource = self
view.addSubview(buttonViewController.view)

Both libraries offer simple implementation, but Euclid provides more flexibility through its delegate and data source patterns, allowing for dynamic content and layout customization.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Euclid

This project is an implementation of the User Profile Interface Animation. Made in [Yalantis] (https://yalantis.com/?utm_source=github)

Check this [project on Dribbble] (https://dribbble.com/shots/1744157-User-Profile-Interface-Animation)

alt text

#Note

depends on Ozodrukh's animation util for CircularReveal animation

#Usage

At the moment, it's just an example of implementation of above interface in your android project. On later stages we are planning to create highly customisable library for good-looking interface.

But, if you want to use it in your project, you need to:

  1. Include the library as local library project.

  2. add this to your projects build.gradle file:

    	repositories {
    	    maven {
    	        url "https://jitpack.io"
    	    }
    	}
    
    


    for CircularReveal module

  3. Extend you activity from EuclidActivity

  4. Implement getAdapter() method, so you return your own data.

For a working implementation, Have a look at the Sample Project - sample

#Customization

You can override several methods to adjust animation durations or radius of circle that reveals the avatar.

#Compatibility

  • Android JELLYBEAN 4.1+

Changelog

Version: 1.0

  • Pilot version

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to github@yalantis.com And do let us know if you have any questions or suggestion regarding the animation.

P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for Android (iOS) better than better. Stay tuned!

License

Copyright 2017, Yalantis

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.