irshadpc / WhatsNew

Showcase new features after an app update similar to Pages, Numbers and Keynote.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WhatsNew

CircleCI Version License Platform

Description

WhatsNew automatically displays a short description of the new features when users update your app. This is similar to what happens in Apple's apps like Pages, Numbers, Keynote, iMovie and TestFlight.

Simply list your new features (with optional icons), customize the appeareance and when to show it (only on major updates for example).

Usage

Run the example project from the Example directory and check out ViewController.swift.

import WhatsNew

let whatsNew = WhatsNewViewController(items: [
	WhatsNewItem.image(title: "Nice Icons", subtitle: "Completely customize colors, texts and icons.", image: #imageLiteral(resourceName: "love")),
	WhatsNewItem.image(title: "Such Easy", subtitle: "Setting this up only takes 2 lines of code, impressive you say?", image: #imageLiteral(resourceName: "threed")),
	WhatsNewItem.image(title: "Very Sleep", subtitle: "It helps you get more sleep by writing less code.", image: #imageLiteral(resourceName: "night")),
	WhatsNewItem.text(title: "Text Only", subtitle: "No icons? Just go with plain text."),
])
whatsNew.presentIfNeeded(on: self)

Customizations

There are a bunch of customizable properties with relative documentation.

/// Defines when to present the What's New view controller. Check the `PresentationOption` enum for more details.
public var presentationOption: PresentationOption = .majorVersion

/// Closure invoked when the user dismisses the view controller.
public var onDismissal: (() -> Void)?

/// Text of the top title.
public var titleText: String = "What's New"

/// Color of the top title.
public var titleColor: UIColor = .black

/// Text of the bottom button that dismisses the view controller.
public var buttonText: String = "Continue"

/// Text color of the bottom button that dismisses the view controller.
public var buttonTextColor: UIColor = .yellow

/// Background color of the bottom button that dismisses the view controller.
public var buttonBackgroundColor: UIColor = .black

Installation

WhatsNew is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'WhatsNew'

You can also use Carthage if you prefer. Add this line to your Cartfile.

github "BalestraPatrick/WhatsNew"

Requirements

iOS 9.3 and Swift 4.0 are required.

Author

I'm Patrick Balestra. Email: me@patrickbalestra.com Twitter: @BalestraPatrick.

License

WhatsNew is available under the MIT license. See the LICENSE file for more info.

About

Showcase new features after an app update similar to Pages, Numbers and Keynote.

License:MIT License


Languages

Language:Swift 91.0%Language:Ruby 4.8%Language:Objective-C 4.2%