/LoremSwiftum

A lightweight lorem ipsum generator for Swift

Primary LanguageSwiftMIT LicenseMIT

LoremSwiftum

LoremSwiftum is a lightweight lorem ipsum generator for iOS and macOS written in Swift. It supports generating following random texts: words, sentences, paragraphs, titles, names, email addresses, URLs and tweets. Originally, this library was created as a Swift port of LoremIpsum written in Objective-C.

Requirements

  • Swift 4.0-4.2
  • Xcode 9.2+
  • iOS 8.0+ / OS X 10.10+

Installation

The library is distributed as a Swift framework and can be integrated into your project in following ways:

Carthage

If you use Carthage for managing your dependencies, put LoremSwiftum into your Cartfile:

github "lukaskubanek/LoremSwiftum"

Then, drag either the LoremSwiftum.xcodeproj or the LoremSwiftum.framework into your project/workspace and link your target against the LoremSwiftum.framework. Also make sure that the framework gets copied to your application bundle.

Git Submodules

Yet another option is using Git submodules and integrating the Xcode project LoremSwiftum.xcodeproj from the submodule directly to your Xcode workspace.

Usage

import LoremSwiftum

Lorem.word
// => One random word

Lorem.words(3)
// => Three random words

Lorem.sentence
// => One random sentence

Lorem.sentences(3)
// => Three random sentences

Lorem.paragraph
// => One random paragraph

Lorem.paragraphs(3)
// => Three random paragraphs

Lorem.title
// => A random title

Lorem.firstName
// => A random first name

Lorem.lastName
// => A random last name

Lorem.fullName
// => A random full name

Lorem.emailAddress
// => A random email address

Lorem.url
// => A random URL

Lorem.shortTweet
// => A random short tweet

Lorem.tweet
// => A random long tweet

Author

Lukas Kubanek // lukaskubanek.com // @kubanekl

License

LoremSwiftum is released under the MIT License.