RandomTextLabel
Layout test UILabel
This library helps you easily stress test your layout constraints, by assigning random long strings to UILabels. The type of content is respected, to help readability of the UI. (A number is replaced with a big number)
For detailed explanation see https://medium.com/@george.termentzoglou/ios-layouttest-with-method-swizzling-d56da55ef68a
Installation
Add this project on your Package.swift
import PackageDescription
let package = Package(
dependencies: [
.Package(url: "https://github.com/geoter/RandomTextLabel.git", majorVersion: 0, minor: 0)
]
)
Usage example
import RandomTextLabel
UILabel.randomText() //now all labels get a random text when .text = .. is called
Meta
George Termentzoglou – Medium – georgeterme@gmail.com
Distributed under the MIT license.