Thumbnail image

TTBaseUIKit Has Been Integrated With SwiftUI Since Version 2.1.0

Table of Contents

Abstract

After spending some time working with SwiftUI, especially integrating it with UIKit on various new projects. I have updated TTBaseUIKit to support SwiftUI from iOS 14, corresponding to library version 2.1.0. This marks a significant milestone in my work. Gaining a deeper understanding of SwiftUI and how to navigate between the UIKit and SwiftUI realms will be beneficial for my future projects. As I have mentioned before SwiftUIL It’s the future

Info
TTBaseUIKit is a framework that helps you build iOS applications in the fastest and most efficient way, by providing base views written in both UIKit Programmatically and SwiftUI. You can explore more details through the #TTBaseUIKit articles.

What’s new?

In this update, I have included a Base Project called TTBaseUIKitExample, which provides comprehensive examples of Base classes such as BaseUIViewController, BaseUITableViewController, BaseCollectionViewController, and more in UIKit, as well as BaseView, BaseButton, BaseText, BaseStack, and others in SwiftUI. The simplest and most straightforward way to understand this is to download the example and run it.

image

TTBaseUIKit

Let’s Code

The simplest and easiest way is to download this example and run it. Hands-on practice is the easiest way to understand it well

Step 1. Download Sample

Click TTBaseUIKit to download and then go to the TTBaseUIKitExample folder to install it.

Step 2. Setup

CocoaPods

pod 'TTBaseUIKit'

Swift Package Manager

  1. File > Swift Packages > Add Package Dependency
  2. Add https://github.com/tqtuan1201/TTBaseUIKit.git
  3. Select “Up to Next Major” with “2.1.0” or higher

or

dependencies: [
    .package(url: "https://github.com/tqtuan1201/TTBaseUIKit.git", branch: "master"),
]

After you finish installing, press ‘Build’ to build project. If you see ‘Build Succeeded’, it means you have succeeded. Then press ‘Run’ to execute the example.

image

TTBaseUIKitExample

If you are only using UIKit

The UIKit component is supported from iOS 10 and above, corresponding to library versions < 2.0.1.

image

TTBaseUIKit UIKit Sample

If you are using both UIKit and SwiftUI or just SwiftUI

The SwiftUI component is supported from iOS 14 and above, corresponding to library versions >= 2.0.1

image

TTBaseUIKit SwiftUI Sample

Conclusion

TTBaseUIKit (Base Project - A framework to quickly create iOS project via base views)

TTBaseUIKit is a framework that helps you build iOS applications in the fastest and most efficient way, by providing base views written in both UIKit Programmatically and SwiftUI. The current release of TTBaseUIKit supports all versions of iOS and OS X since the introduction of Auto Layout on each platform, in Swift language with a single codebase.

image

TTBaseUIKit Framework

Happy coding! See you soon ^^

Posts in this Series