Skip to content

12bay/TTBaseUIKit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TTBaseUIKit

Build your project with programmatically UI

Version License Platform Carthage compatible

CocoaPods

Add the following line to your Podfile:

pod 'TTBaseUIKit'

Carthage

Add the following line to your Cartfile:

github "tqtuan1201/TTBaseUIKit"

Manual

  1. Put TTBaseUIKit repo somewhere in your project directory.
  2. In Xcode, add TTBaseUIKit.xcodeproj to your project.
  3. On your app's target, add the TTBaseUIKit framework:
    1. as an embedded binary on the General tab.
    2. as a target dependency on the Build Phases tab.

Usage example

A few motivating and useful examples of how your product can be used. Spice this up with code blocks and potentially more screenshots.

Basics

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]

Meta

Truong Quang Tuan – @website/gmail[email protected]

Distributed under the XYZ license. See LICENSE for more information.

https://github.com/tqtuan1201/TTBaseUIKit

About my project

We build high quality apps! Get in touch if you need help with a project.

License

TTBaseUIKit is distributed under the MIT license. See LICENSE for details.

Packages

No packages published

Languages

  • Swift 99.6%
  • Other 0.4%