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.
- Swift 4
- Xcode 9 beta 6
- iOS 8.0+ / OS X 10.10+
This library is distributed as a Swift framework and can be integrated into your project in following ways:
The easiest way is to use the package manager Carthage.
- Add
github "lukaskubanek/LoremSwiftum"to yourCartfile. - Run
carthage bootstrap. - Drag either the
LoremSwiftum.xcodeprojor theLoremSwiftum.frameworkinto your project/workspace and link your target against theLoremSwiftum.framework. - Make sure the framework gets copied to your application bundle.
- Import the framework using
import LoremSwiftum.
Another option is to use Git submodules and integrating the Xcode project LoremSwiftum.xcodeproj directly to your Xcode workspace.
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.tweet
// => A random tweetLukas Kubanek // lukaskubanek.com // @kubanekl
LoremSwiftum is released under the MIT License.