navigation-stack
:octocat: NavigationStack is a stack-modeled UI navigation controller. Swift UI library made by @Ramotion
Top Related Projects
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
: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: 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
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion
Quick Overview
The Ramotion/navigation-stack repository is a collection of custom navigation controllers for iOS, built using Swift. It provides a set of UI components and animations that can be used to create unique and engaging navigation experiences in iOS applications.
Pros
- Customizable Navigation: The library offers a range of custom navigation controllers, each with its own unique animation and behavior, allowing developers to create custom navigation experiences for their applications.
- Smooth Animations: The navigation controllers in this library feature smooth and fluid animations, providing a polished and visually appealing user experience.
- Well-Documented: The repository includes detailed documentation and examples, making it easy for developers to understand and integrate the library into their projects.
- Active Development: The project is actively maintained, with regular updates and bug fixes, ensuring that the library remains up-to-date and compatible with the latest iOS versions.
Cons
- Limited Platforms: The library is designed specifically for iOS and does not provide support for other platforms, such as Android or web.
- Potential Performance Issues: Depending on the complexity of the navigation controllers used, there may be some performance implications, especially on older or less powerful devices.
- Learning Curve: Integrating the library into an existing project may require some time and effort, as developers need to familiarize themselves with the library's API and understand how to customize the navigation controllers to fit their specific needs.
- Dependency on External Libraries: The library may have dependencies on other external libraries, which could introduce additional complexity and potential compatibility issues.
Code Examples
Here are a few examples of how to use the Ramotion/navigation-stack library:
- Creating a Custom Navigation Controller:
let navigationController = RamoStackNavigationController()
navigationController.viewControllers = [firstViewController, secondViewController]
This code creates a new instance of the RamoStackNavigationController
and sets the initial view controllers to be displayed.
- Customizing the Navigation Animation:
let navigationController = RamoStackNavigationController(navigationStyle: .push)
navigationController.navigationStyle = .fade
This code sets the navigation style of the RamoStackNavigationController
to use a fade animation instead of the default push animation.
- Presenting a Modal View Controller:
let modalViewController = ModalViewController()
navigationController.present(modalViewController, animated: true, completion: nil)
This code presents a modal view controller using the RamoStackNavigationController
.
- Pushing a New View Controller:
let newViewController = NewViewController()
navigationController.pushViewController(newViewController, animated: true)
This code pushes a new view controller onto the navigation stack using the RamoStackNavigationController
.
Getting Started
To get started with the Ramotion/navigation-stack library, follow these steps:
-
Add the library to your project using a dependency manager like CocoaPods or Carthage.
-
Import the library in your Swift file:
import RamoStackNavigation
- Create an instance of the
RamoStackNavigationController
and set the initial view controllers:
let navigationController = RamoStackNavigationController()
navigationController.viewControllers = [firstViewController, secondViewController]
- Customize the navigation style and behavior as needed:
navigationController.navigationStyle = .fade
navigationController.interactivePopGestureRecognizer?.isEnabled = true
- Present or push the navigation controller as needed:
window?.rootViewController = navigationController
That's it! You can now start using the Ramotion/navigation-stack library to create custom navigation experiences in your iOS application.
Competitor Comparisons
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
Pros of BFKit-Swift
- Comprehensive utility library with a wide range of functions and extensions
- Regularly updated and maintained
- Well-documented with extensive README and inline comments
Cons of BFKit-Swift
- Larger codebase, potentially increasing app size
- May include unnecessary functions for specific use cases
- Steeper learning curve due to the extensive API
Code Comparison
BFKit-Swift:
let randomString = String.random(ofLength: 10)
let isValidEmail = "example@email.com".isValidEmail()
let rgbColor = UIColor(red: 255, green: 128, blue: 0)
navigation-stack:
let navigationController = NavigationStack()
navigationController.pushViewController(viewController, animated: true)
navigationController.popViewController(animated: true)
While navigation-stack focuses specifically on navigation functionality, BFKit-Swift provides a broader set of utilities. navigation-stack offers a custom navigation controller with unique transitions, whereas BFKit-Swift includes various extensions and helper functions for different aspects of iOS development.
The choice between these libraries depends on the specific needs of your project. If you require a custom navigation solution with visually appealing transitions, navigation-stack might be more suitable. However, if you're looking for a comprehensive utility library that covers various aspects of iOS development, BFKit-Swift could be a better choice.
:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion
Pros of folding-cell
- More versatile UI component, applicable to various scenarios
- Simpler implementation for individual cell animations
- Lightweight and focused on a single UI element
Cons of folding-cell
- Limited to cell-based animations, less suitable for full-screen transitions
- Requires more custom work to integrate into complex navigation flows
- May not provide as smooth transitions between different views
Code Comparison
folding-cell:
let cell = FoldingCell()
cell.itemCount = 2
cell.backgroundColor = .clear
cell.foregroundView = foregroundView
cell.containerView = containerView
navigation-stack:
let navigationController = NavigationStack()
navigationController.pushViewController(viewController, animated: true)
navigationController.present(viewController, animated: true, completion: nil)
Key Differences
- folding-cell focuses on animating individual UI elements
- navigation-stack provides a complete navigation solution
- folding-cell is more suitable for in-page animations
- navigation-stack excels in managing app-wide navigation flows
Both libraries offer unique UI experiences, with folding-cell providing engaging cell animations and navigation-stack offering smooth transitions between full-screen views. The choice between them depends on the specific requirements of your app's UI and navigation structure.
:octocat: ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion
Pros of expanding-collection
- More visually appealing and interactive UI with card-based layout
- Supports both vertical and horizontal scrolling for enhanced user experience
- Easier to implement for collection-style data presentation
Cons of expanding-collection
- Less suitable for traditional navigation patterns
- May require more customization for non-standard use cases
- Potentially higher learning curve for developers unfamiliar with custom collection views
Code Comparison
expanding-collection:
let viewController = ExpandingViewController(style: .fill)
viewController.itemSize = CGSize(width: 250, height: 350)
viewController.collectionView?.contentInset = UIEdgeInsets(top: 20, left: 0, bottom: 0, right: 0)
navigation-stack:
let navigationController = NavigationStack()
navigationController.push(viewController: ViewController())
navigationController.pop()
Both libraries offer unique approaches to UI navigation and presentation. expanding-collection excels in creating visually engaging collection-based interfaces, while navigation-stack provides a more traditional stack-based navigation system with custom transitions. The choice between the two depends on the specific requirements of your app's user interface and navigation structure.
:octocat: PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion
Pros of paper-onboarding
- Lightweight and focused on onboarding UI
- Easier to implement for simple onboarding flows
- More customizable animation options
Cons of paper-onboarding
- Limited to onboarding scenarios
- Less versatile for general navigation purposes
- Fewer built-in transition effects
Code Comparison
paper-onboarding:
let onboarding = PaperOnboarding()
onboarding.dataSource = self
onboarding.delegate = self
view.addSubview(onboarding)
navigation-stack:
let navigationController = NavigationStack()
navigationController.pushViewController(viewController, animated: true)
self.present(navigationController, animated: true, completion: nil)
Summary
paper-onboarding is a specialized library for creating engaging onboarding experiences, while navigation-stack offers a more comprehensive solution for custom navigation transitions. paper-onboarding excels in simplicity and animation customization for onboarding flows, but lacks the versatility of navigation-stack for general app navigation. navigation-stack provides a wider range of transition effects and is better suited for complex navigation scenarios, but may be overkill for simple onboarding implementations. Choose paper-onboarding for focused onboarding UI or navigation-stack for more advanced navigation requirements.
: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 visually appealing and interactive UI element
- Compact design, ideal for mobile applications
- Customizable appearance with various animation options
Cons of circle-menu
- Limited to circular layout, less flexible for complex navigation structures
- May not be suitable for applications with many menu items
- Potentially less intuitive for users accustomed to traditional navigation patterns
Code Comparison
circle-menu:
let menuButtonSize: CGFloat = 64.0
let circleMenu = CircleMenu(
frame: CGRect(x: 0, y: 0, width: menuButtonSize, height: menuButtonSize),
normalIcon:"icon_menu",
selectedIcon:"icon_close",
buttonsCount: 4,
duration: 0.5,
distance: 120)
view.addSubview(circleMenu)
navigation-stack:
let navigationController = NavigationStack()
navigationController.pushViewController(viewController, animated: true)
circle-menu offers a more visually striking and compact menu solution, ideal for mobile apps with limited screen space. However, navigation-stack provides a more traditional and flexible navigation approach, better suited for apps with complex hierarchies or numerous screens. The code comparison shows that circle-menu requires more initial setup but offers greater customization, while navigation-stack follows a simpler, more familiar implementation pattern.
: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 focused on tab bar animations, providing a variety of customizable animation styles
- Lighter weight and easier to implement for simple tab bar animations
- Better suited for projects that require only tab bar customization
Cons of animated-tab-bar
- Limited to tab bar functionality, lacking the comprehensive navigation features of navigation-stack
- May require additional libraries or custom code for more complex navigation scenarios
- Less suitable for apps with deep navigation hierarchies
Code Comparison
animated-tab-bar:
let tabBar = RAMAnimatedTabBarController()
let item1 = RAMAnimatedTabBarItem(title: "Home", image: UIImage(named: "home"), tag: 1)
item1.animation = RAMBounceAnimation()
tabBar.viewControllers = [homeVC]
tabBar.animatedItems = [item1]
navigation-stack:
let navigationController = NavigationStack()
navigationController.push(viewController: firstVC)
navigationController.push(viewController: secondVC)
navigationController.pop()
Both libraries offer unique features for iOS UI customization. animated-tab-bar excels in creating engaging tab bar animations, while navigation-stack provides a more comprehensive solution for custom navigation transitions. The choice between the two depends on the specific requirements of your project, with animated-tab-bar being more suitable for simpler tab-based interfaces and navigation-stack offering more flexibility for complex navigation hierarchies.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
NAVIGATION STACK
Navigation Stack is a library with stack-modeled UI navigation controller.
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.
Stay tuned for the latest updates:
Requirements
- iOS 9.0+
- Xcode 9
Installation
Just add the Source folder to your project.
or use CocoaPods with Podfile:
pod 'Navigation-stack'
or Carthage users can simply add to their Cartfile
:
github "Ramotion/navigation-stack"
Usage
-
YourNavigationController inherit from
NavigationStack
-
add code to root viewViewController
override func viewDidLoad() {
super.viewDidLoad()
navigationController!.interactivePopGestureRecognizer?.delegate = self
}
extension YourViewController: UIGestureRecognizerDelegate {
func gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer) -> Bool {
if navigationController?.viewControllers.count == 2 {
return true
}
if let navigationController = self.navigationController as? NavigationStack {
navigationController.showControllers()
}
return false
}
}
ð License
Navigation Stack is released under the MIT license. See LICENSE for details.
This library is a part of a selection of our best UI open-source projects.
If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com
ð± Get the Showroom App for iOS to give it a try
Try this UI component and more like this in our iOS app. Contact us if interested.
Top Related Projects
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
: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: 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
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot