Create, Push, and Present Any View Controller in 1 LOC using Metaprogramming

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • uiviewcontroller-metaprogramming

    A supplementary example for an article https://bit.ly/3qNnRcu

    We make view controller instantiation more type-safe by eliminating string IDs and use metaprogramming to generate functions that let you create, push, and present any view controller in 1 LOC, so you can save ~15 LOC whenever you want to perform push or present. It works both with storyboard-based view controllers and code-only ones. The generated code is autocomplete-friendly. Here is the full source code example.

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • Insanity

    Meta-programming for Swift, stop writing boilerplate code.

    Now that we have designed our APIs we can generate the code. For each view controller in our project, we are going to generate 3 functions: create, push, and present. We are going to generate code with Sourcery — a tool developed by Krzysztof Zabłocki.

  • SwiftGen

    The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

    It is important to say that there is an elegant solution to the resource consistency problem that we haven’t adapted yet. Instead of testing raw values of UIStoryboard.Name cases, we could just generate the UIStoryboard.Name enum. Please refer to SwiftGen for the details.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Localization strings files have a new format/convention?

    1 project | /r/SwiftUI | 13 Sep 2022
  • Do you guys/gals use the "Costants.swift" file or the "Localizations.strings" method?

    1 project | /r/iOSProgramming | 23 Nov 2021
  • How would you solve this localization issue?

    1 project | /r/iOSProgramming | 20 Sep 2021
  • Can I install SwiftGen through a Gemfile?

    1 project | /r/iOSProgramming | 16 Jun 2021
  • Can I use SwiftGen to map Lottie files?

    1 project | /r/iOSProgramming | 10 Jun 2021

Did you konow that Swift is
the 15th most popular programming language
based on number of metions?