Build your project with programmatically UI
Add the following line to your Podfile:
pod 'TTBaseUIKit'
Add the following line to your Cartfile:
github "tqtuan1201/TTBaseUIKit"
- Put TTBaseUIKit repo somewhere in your project directory.
- In Xcode, add
TTBaseUIKit.xcodeproj
to your project. - On your app's target, add the TTBaseUIKit framework:
- as an embedded binary on the General tab.
- as a target dependency on the Build Phases tab.
A few motivating and useful examples of how your product can be used. Spice this up with code blocks and potentially more screenshots.
Config setting in AppDelegate
let view:ViewConfig = ViewConfig()
view.viewBgNavColor = UIColor.getColorFromHex.init(netHex: 0xC41F53)
let size:SizeConfig = SizeConfig()
let font:FontConfig = FontConfig()
TTBaseUIKitConfig.withDefaultConfig(withFontConfig: font, frameSize: size, view: view)?.start(withViewLog: true)
self.window = UIWindow(frame: UIScreen.main.bounds)
self.window!.rootViewController = UINavigationController.init(rootViewController: YourViewController())
self.window!.makeKeyAndVisible()
Custom show message
let noti:TTBaseNotificationViewConfig = TTBaseNotificationViewConfig(with: window)
noti.setText(with: "WELCOME ^^", subTitle: "Just demo little element ui with write by programmatically swift")
noti.type = .NOTIFICATION_VIEW
noti.touchType = .SWIPE
noti.notifiType = .SUCCESS
noti.onShow()
Custom show popup
let popupVC = TTPopupViewController(title: "SOMETHING LIKE THIS", subTitle: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has b", isAllowTouchPanel: true)
self.present(popupVC, animated: true)
Set show nodata for uitableview
self.tableView.setStaticBgNoData(title: "NO DATA", des: "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making ") {
print("Touch handle!!!!")
}
For more examples and usage, please refer to example project [TTBaseUIKitExample]
Truong Quang Tuan – @website/gmail – [email protected]
Distributed under the XYZ license. See LICENSE
for more information.
https://github.com/tqtuan1201/TTBaseUIKit
We build high quality apps! Get in touch if you need help with a project.
TTBaseUIKit is distributed under the MIT license. See LICENSE for details.