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 SwiftUI: It’s the future
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.
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
- File > Swift Packages > Add Package Dependency
- Add https://github.com/tqtuan1201/TTBaseUIKit.git
- 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.
If you are only using UIKit
The UIKit
component is supported from iOS 10 and above
, corresponding to library versions < 2.0.1
.
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
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.
Happy coding! See you soon ^^
Posts in this Series
- TTBaseUIKit Has Been Integrated With SwiftUI Since Version 2.1.0
- Rebuiding Train Booking Feature by SwiftUI in 12Bay Application - Design
- What Is the Spacer and How Do We Use It in SwiftUI
- 12Bay Integrated SwiftUI. With 12Bay, No StoryBoard, No XIB Files, No Cocoapods, ...
- Understand View in SwiftUI
- Understand Safe Area in SwiftUI
- WWDC23 From the Perspective of an IOS Developer
- SwiftUI Series - Updating TTBaseUIKit to Support SwiftUI