Voir is a Swift framework designed to provide a fully functional and easy-to-use MVVM architecture for iOS app development for the braves still relying on UIKit.
The name “Voir” comes from the French word meaning “to see” reflecting its goal of enhancing the visibility and clarity of your app's architecture.
This project was created to support a presentation at a conference focused on delivering useful topics to the tech community. The theme of my talk is:
Elegant Development: poetry and beauty in Swift code.
-
MVVM Architecture: Voir provides a solid foundation for implementing the MVVM architecture in your iOS apps. It separates concerns by dividing the application logic into three main components: Model, View, and ViewModel.
-
Reusable Components: The package introduces reusable components such as
VoirComponent
andVoirModel
, making it easier to structure your app's UI and business logic. -
Lifecycle Observations: Voir provides built-in lifecycle observation mechanism that automatically notify its components. This feature aids in efficiently managing resource allocation and deallocation. This aspect of Voir almost eliminates the need for touching a UIViewController again, as the
VoirController
efficiently relays all of its lifecycle events to bothVoirComponent
andVoirModel
. -
Builder Patterns: The framework includes builder patterns (
VoirBuilder
andConstraintsBuilder
) that simplify the process of constructing complex UI hierarchies and defining layout constraints. -
View Controller Helper: With the
viewController
property extension onUIView
, you can easily find the parent UIViewController of any view, aiding in navigation and communication within your app.
- To integrate Voir into your project, simply include the framework as a Swift package.
- There is also a
.xctemplate
to easily create a Voir MVVM Scene. Check the recording below 👇
voir-template.mp4
For more detailed usage instructions and examples, refer to the DemoApp
inside Support/
folder in the repository.
Contributions to Voir are welcome! If you find a bug, want to request a feature, or would like to improve the code, please submit an issue or pull request.
Voir is free of license. You are free to use and modify. See LICENSE for more details.
Voir is currently developed and maintained by Arthur da Paz.