GithubHelp home page GithubHelp logo

hhru / nivelir Goto Github PK

View Code? Open in Web Editor NEW
206.0 19.0 6.0 17.37 MB

A Swift DSL for navigation in iOS and tvOS apps with a simplified, chainable, and compile time safe syntax

License: MIT License

Ruby 0.19% Swift 98.09% Shell 1.71% Objective-C 0.02%
swift router routing navigation dsl xcode ios tvos spm cocoapods

nivelir's People

Contributors

almazrafi avatar timbaev avatar xanderblinov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nivelir's Issues

Using custom container view controllers with DefaultScreenIterator.

DefaultScreenIterator works with standard controllers (such as UINavigationController, UITabBarController), but it doesn't work with non-native container view controllers (for example some custom bottom sheet controller or custom tab bar controller).

Of course, we can create our own implementation of ScreenIterator, but it doesn't look nice, because it 's almost copy-paste of DefaultScreenIterator. Moreover code is a bit tricky, so it's difficult to understand.

I think it would be a good idea to make DefaultScreenIterator more flexible and easier to extend. In my fork I made that solution.

I can make PR or may be you have your own solution.

Build failure in Xcode 14.0.1

I have some issues when build Nivelir and Example app in Xcode 14, but it success and display some errors

Screenshot 2022-10-12 at 14 16 30

I tried integrate Nivelir in my project by Carthage with Tuist but build failure

`*** Fetching Nivelir
*** Checking out Nivelir at "1.4.4"
*** No cache found for FirebaseAnalyticsBinary, building with all downstream dependencies
*** No cache found for FirebaseCrashlyticsBinary, building with all downstream dependencies
*** No cache found for Nivelir, building with all downstream dependencies
*** Downloading binary-only framework FirebaseAnalyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
*** xcodebuild output can be found in /var/folders/mj/2bjgx7pd5jj7_vr_w39l2cl40000gp/T/carthage-xcodebuild.RQatES.log
*** Downloading binary-only framework FirebaseCrashlyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json"
*** Building scheme "Nivelir iOS" in Nivelir.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/o.krasnov/Projects/qa-devices/src/Tuist/Dependencies/Carthage/Checkouts/Nivelir/Nivelir.xcodeproj -scheme Nivelir\ iOS -configuration Release -derivedDataPath /Users/o.krasnov/Library/Caches/org.carthage.CarthageKit/DerivedData/14.0_14A309/Nivelir/1.4.4 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive VALIDATE_WORKSPACE=NO -archivePath /var/folders/mj/2bjgx7pd5jj7_vr_w39l2cl40000gp/T/Nivelir SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/o.krasnov/Projects/qa-devices/src/Tuist/Dependencies/Carthage/Checkouts/Nivelir)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/mj/2bjgx7pd5jj7_vr_w39l2cl40000gp/T/carthage-xcodebuild.RQatES.log
The 'carthage' command exited with error code 1
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose
Resolved cache profile 'Development' from Tuist's defaults
FirebaseCrashlytics is not a valid configured external dependency for platform ios
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose`

I switched to 1.4.6 and have same problem

Переключение таба

Привет. Как через нивелир можно достать TabBar и открыть на нем второй таб?
topCotainer у меня RootViewController.
Пытаюсь найти TabBar через container, но он его не видит.
image

Мой код:

navigator.navigate { route in
            route
                .first(.tabs)
                .selectTab(of: UINavigationController.self, with: .index(1))
                .makeVisible()
}

Question: Tight coupling with Navigation

Hey! Thanks for an amazing library, you did a tremendous job!

IMO Nivelir has one of the most well-designed APIs I've come across as an Apple platforms developer, especially given the amount of complexities it hides. Abstractions are well-thought and on-point. 🤌

I am considering to use Nivelir for my next project, because I found myself solving the same problems when doing the complex global routing, but one thing I am concerned about is tight coupling between ViewControllers/Views and Navigation by invoking navigation actions directly from ViewControllers/Views. Basically the problem that Coordinator pattern is intended to solve.

I do understand that this library is not opinionated about where to invoke navigation actions (which it makes it even more cool) and it can perfectly be abstracted and delegated away to Coordinator or other assisting entities.

The question is – what is your take on it? How are you dealing with your Presentation Layer (VC/View) "knowing too much" about Navigation? Or you simply don't focus on it and it works fine for you and you don't overstretch with abstractions here by introducing something like Coordinators?

Thanks!

How to get route

Hi! Thanks for lib!
How can I get first/last route in stack?
Hierarchy
TabBar VC with 3 tabs -> Navigation VC with pushed view controllers ()

Code

return route
  .first(.tabs) 
  .selectedTab
  .last(.stack)
  .??Need to get first or last screen in Navigation VC stack??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.