SwiftBrick is an easy-to-use, feature-rich UI basic framework, the main purpose is to quickly build APP UI.
Contains some color resources (all support dark mode).
功能
BaseVC
- Including several common ViewController base classes, TableViewController, CollectionViewController, WKWebViewController, ViewController, UIHostingController and other VC packages
- BaseVC protocol: handle the left and right buttons of the navigation bar
BaseCell
Cell base class protocol -- TableView, CollectionView's Cell and Header/Footer registration for easy reuse
Extensions
- UINavigationBar extended background color modification, split line hidden, transparency change
- UINavigationController extends the smooth switching of the hidden display of the push-in and out-stack navigation bar
- UIViewController extends StatusBar to show and hide
- UIView extended gradient background
- UITableViewCell extends various style dividing lines
- UIButton extended graphic layout
- UIGestureRecognizer extension closure
- Array extension
- CALayer extension
- CGSize extension
- Dictionary extension
- Dispatch extension
- Layout extension
- NSObject extension
- String extension
- SFSymbol extension
- UIImage extension
- UIStackView extension
- UITabBar extension
- UITextView extension
- UIColor extension
- UserDefault, UserDefaultSuite attribute wrapper
Utilities
Various Swift macro definitions
Vibration Feedback Tool
Comparison and judgment of iOS system version
ViewFactory
Custom View
Install
Cocoapods
-
Add
pod 'SwiftBrick'
to Podfile -
Execute
pod install or pod update
-
Import
import SwiftBrick
Swift Package Manager
Starting from Xcode 11, the Swift Package Manager is integrated, which is very convenient to use. SwiftBrick also supports integration via the Swift Package Manager.
Select File > Swift Packages > Add Pacakage Dependency
in Xcode's menu bar, and enter in the search bar
https://github.com/jackiehu/SwiftBrick
, you can complete the integration
Manual integration
SwiftBrick also supports manual integration, just drag the SwiftBrick folder in the Sources folder into the project that needs to be integrated