TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Moshe Berman.
Surfboard is a delightful onboarding library for iOS.
Surfboard was developed with Xcode 5 and the iOS 7 SDK. It uses autolayout and UICollectionViewController
, so although it hasn't been tested on iOS 6, you may entertain yourself by trying to run Surfboard on it.
Add the contents of the SRFSurfboard project to your directory, or use Cocoapods:
pod 'SRFSurfboard'
When we talk about Surfboards, we talk about a set of panels. Each panel is a screenful of information, including some text, an image or screenshot, and optionally, a button.
You can show a surfboard by using a segeue, or by creating a an instance of SRFSurfboardViewController
and passing it an array of some panels. You can also pass a path to a JSON file, which we'll discuss in just a second.
The two initializers for a surfboard:
// One surfboard, the initWithPanels: way.
SRFSurfboardViewController *surfboard = [[SRFSurfboardViewController alloc] initWithPanels:anArrayOfPanels];
// Another surfboard, the initWithPathToCofiguration way.
SRFSurfboardViewController *surfboard = [[SRFSurfboardViewController alloc] initWithPathToConfiguration:aPathToJSONFile];
Panels can be created programatically, or using a JSON file. The JSON format is simple. There are four keys:
tintColor
of the surfboard.Note that either the contents of the "image" or "screen" will be used, but not both. Supplying both results in undefined behavior.
Here's a sample panel:
{
"text" : "Welcome to Surfboard.",
"image" : "swipe"
}
You'd want to add an image to your bundle or asset catelog named "swipe.png" and Surfboard would display it.
SRFSurfboard is released under the MIT license. See LICENSE for more.
If you like SRFSurfboard, you may like some of my other projects on GitHub.