Skip to content

Xopoko/MaxUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MaxUI

MaxUI is a robust, declarative UI framework designed for developers who want to leverage the power and flexibility of UIKit while enjoying the modern, intuitive design approach of SwiftUI. The goal of MaxUI is to provide an efficient and straightforward way to create iOS applications without compromising performance, customization, or the design principles of UIKit.

Key Features

Highly Composable:

MaxUI uses a declarative UI programming style similar to SwiftUI. Its MHStack struct allows developers to construct complex user interfaces by nesting composable components (or MViews).

Seamless UIKit Integration:

Despite the SwiftUI-like syntax, MaxUI integrates seamlessly with UIKit. This seamless integration is evident in the way MaxUI interacts with UIView (in the MHStack class) and other UIKit classes.

Dynamic UI Updates:

MaxUI utilizes Combine's publishers to enable dynamic UI updates. The UI responds reactively to data changes, keeping your application responsive and up-to-date.

SwiftUI Preview Support:

MaxUI provides support for SwiftUI previews, significantly improving the developer experience. Developers can preview their UIKit-based interfaces in SwiftUI's PreviewProvider, enabling rapid iteration during the development process.

Reusability:

MaxUI is designed with reusability in mind. Components such as the MHStack can be reused throughout your code, leading to cleaner, more maintainable code.

Customizable Components:

MaxUI's components, like MHStack, are highly customizable. Developers can modify properties like alignment, spacing, and distribution to achieve the desired look and feel.

Robust State Management:

MaxUI uses MBinding for state management, leading to more organized and readable code and contributing to the better maintenance and understanding of the codebase.

Requirements

  • iOS 15 or later
  • XCode 11 or later

Installation

MaxUI can be installed using the Swift Package Manager, a tool for managing the distribution of Swift code.

Swift Package Manager

To integrate MaxUI into your Xcode project using Swift Package Manager, add it to the dependencies value of your Package.swift:

dependencies: [
    .package(url: "https://github.com/Xopoko/MaxUI.git")
]

Usage

MaxUI can be used to build complex, customizable user interfaces. Here are some examples:

// Most common use
MButton("some text") {
    print("tap")
}
.insets(top: 24)
.configure(in: self)

// Initialization with custom 'label'
MButton {
    print("tap")
} label: {
    Text("some text")
}
.insets(top: 24)
.configure(in: self)

MHStack {
    Text("some text")
    Button("some button") {
        print("tap")
    }
}
.spacing(24)
.configure(in: self)

Please note that these are just samples. The actual usage will depend on your application's specific needs and constraints.

License

MaxUI is released under the MIT license. See LICENSE for details.

Support

If you have any questions or encounter any issues, please open an issue on our GitHub page.

Your contributions and suggestions are always welcome!

Visual aids (screenshots, gifs, videos) will be added to this README soon to provide a better understanding of the usage and features of MaxUI.

Thank you for considering MaxUI for your project!

About

This is a DSL wrapper over UIKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages