Skip to content

TStyle is a simple and flexible UI component fully written in Swift. TStyle is developed to help users quickly define attributes detail without having to define from scratch

License

fanta1ty/TStyle

Repository files navigation

LOGO

TStyle

TStyle is a simple and flexible UI component fully written in Swift. TStyle is developed to help users quickly define attributes detail without having to define from scratch

Swift 5.0 Version License Platform Email

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

From CocoaPods

TStyle is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'TStyle'

Second, install TProgressHUD into your project:

pod install

Swift Package

TProgressHUD is designed for Swift 5. To depend on the logging API package, you need to declare your dependency in your Package.swift

.package(url: "https://github.com/fanta1ty/TStyle.git", brand: "master"),

Usage

import TStyle
  1. For label:
let exampleLabel = UILabel()

TStyle<UILabel>()
.multiline()
.textColor(.black)
.textAlignment(.left)
.font(.systemFont(ofSize: 16))
.accessibilityIdentifier("label.example")
.text("Example Label")
.apply(to: exampleLabel)
  1. For button:
let exampleButton = UIButton()
TStyle<UIButton>()
.font(.systemFont(ofSize: 16))
.title("Example Button")
.roundedCorners()
.accessibilityIdentifier("button.example")
.apply(to: exampleButton)
  1. For image view:
let exampleImageView = UIImageView()
TStyle<UIImageView>()
.image(UIImage(named: "")!)
.roundedCorners()
.accessibilityIdentifier("image.example")
.apply(to: exampleImageView)
  1. For view:
let exampleView = UIView()
TStyle<UIView>()
.roundedCorners()
.backgroundColor(.black)
.accessibilityIdentifier("view.example")
.apply(to: exampleView)

Requirements

  • iOS 11.0 or later
  • Swift 5.0 or later

Author

fanta1ty, thinhnguyen12389@gmail.com

License

TStyle is available under the MIT license. See the LICENSE file for more info.

About

TStyle is a simple and flexible UI component fully written in Swift. TStyle is developed to help users quickly define attributes detail without having to define from scratch

Topics

Resources

License

Stars

Watchers

Forks