CenterTextLayer 0.0.2

CenterTextLayer 0.0.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2018
SPMSupports SPM

Maintained by Cem Olcay.



CenterTextLayer

Universal CATextLayer subclass that centers its text vertically.

alt tag

Requierments

  • Swift 3.0+
  • iOS 8.0+
  • tvOS 9.0+
  • macOS 10.9+

Install

use_frameworks!
pod 'CenterTextLayer'

Usage

It's just a regular CATextLayer subclass that center its text. Use it like any CATextLayer

let textLayer = CenterTextLayer()
textLayer.frame = bounds
textLayer.string = "Center Text!"