Presentation helps you to make tutorials, release notes and animated pages.

Overview

⚠️ DEPRECATED, NO LONGER MAINTAINED

Presentation logo

Version CI Status Carthage Compatible Swift License Platform

Looking for the easiest way of presenting something in your iOS app? Then you are in the right place. Presentation will help you make your tutorials, release notes and any kind of animated pages with the minimum amount of effort.

Presentation includes the following features:

  • Custom positioning: You can use Position for percentage-based position declaration.
  • Content: View model used for custom positioning and animations. It translates your percents to AutoLayout constraints behind the scenes.
  • Slides: You can use any kind of UIViewController as a slide. SlideController is your good friend if you want to use custom positioning and animation features on your pages.
  • Background: You can add views that are visible across all the pages. Also it's possible to animate those views during the transition to the specific page.
  • Animations: You can easily animate the appearance of a view on the specific page.

Presentation works both on the iPhone and the iPad. You can use it with both Swift and Objective-C.

Try one of our demos to see how it works:

pod try Presentation

Table of Contents

Usage

Presentation controller

import Presentation

let viewController1 = UIViewController()
viewController1.title = "Controller A"

let viewController2 = UIViewController()
viewController2.title = "Controller B"

let presentationController = PresentationController(pages: [viewController1, viewController2])

If that's the only thing you need, look into Pages.

Position

Position is percentage-based; you can use left, right, top, bottom to set a position.

let position = Position(left: 0.3, top: 0.4)

Content view model

Content view model is a layer between UIView and Position. The current position is the center of a view by default, but can also be changed to the origin of a view.

let view = UIView(frame: CGRect(x: 0, y: 0, width: 200, height: 100))
let position = Position(left: 0.3, top: 0.4)

let centeredContent = Content(view: label, position: position)
let originContent = Content(view: label, position: position, centered: false)

Slides

let label = UILabel(frame: CGRect(x: 0, y: 0, width: 200, height: 100))
label.text = "Slide 1"

let position = Position(left: 0.3, top: 0.4)
let content = Content(view: label, position: position)

let controller = SlideController(contents: [content])

presentationController.add([controller])

Page animations

Content in let label = UILabel(frame: CGRect(x: 0, y: 0, width: 200, height: 100)) label.text = title let position = Position(left: 0.3, top: 0.4) return Content(view: label, position: position) } var slides = [SlideController]() for index in 0...2 { let content = contents[index] let controller = SlideController(contents: [content]) let animation = TransitionAnimation( content: content, destination: Position(left: 0.5, top: content.initialPosition.top), duration: 2.0, dumping: 0.8, reflective: true) controller.add(animations: [animation]) slides.append(controller) } presentationController.add(slides)">
let contents = ["Slide 1", "Slide 2", "Slide 3"].map { title -> Content in
  let label = UILabel(frame: CGRect(x: 0, y: 0, width: 200, height: 100))
  label.text = title

  let position = Position(left: 0.3, top: 0.4)

  return Content(view: label, position: position)
}

var slides = [SlideController]()

for index in 0...2 {
  let content = contents[index]
  let controller = SlideController(contents: [content])
  let animation = TransitionAnimation(
    content: content,
    destination: Position(left: 0.5, top: content.initialPosition.top),
    duration: 2.0,
    dumping: 0.8,
    reflective: true)
  controller.add(animations: [animation])

  slides.append(controller)
}

presentationController.add(slides)

Background views

let imageView = UIImageView(image: UIImage(named: "image"))
let content = Content(view: imageView, position: Position(left: -0.3, top: 0.2))

presentationController.addToBackground([content])

// Add pages animations
presentationController.add(animations: [
  TransitionAnimation(content: content, destination: Position(left: 0.2, top: 0.2))],
  forPage: 0)

presentationController.add(animations: [
  TransitionAnimation(content: content, destination: Position(left: 0.3, top: 0.2))],
  forPage: 1)

Installation

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

pod 'Presentation'

Presentation is also available through Carthage. To install just write into your Cartfile:

github "hyperoslo/Presentation"

Components

Presentation wouldn’t be possible without the help of these components:

  • Pages: The easiest way of setting up a UIPageViewController

  • Cartography: Helps you set up your Auto Layout constraints declaratively and without any stringly typing!

Contributing

Please see our playbook for guidelines on contributing.

Credits

Hyper made this. We’re a digital communications agency with a passion for good code and delightful user experiences. If you’re using this library we probably want to hire you (we consider remote employees, too; the only requirement is that you’re awesome).

License

Presentation is available under the MIT license. See the LICENSE.

Comments
  • Bug: animation glitch / improper scrolling behavior

    Bug: animation glitch / improper scrolling behavior

    Run a demo, then: steps to reproduce the bug:

    1. Press Next Page or scroll to the next / previous page
    2. While application keeps inertial scrolling (fingers are off the screen), try to touch and scroll text label only. You have to be fast.
    3. After view has scrolled to the other page, try to scroll it again. You'll see the glitch.

    Start: screen shot 2015-06-10 at 10 29 58 Pay attention to the positions of background objects on the screen.

    Before glitch: screen shot 2015-06-10 at 10 30 04

    The positions of the background objects are the same, while label has scrolled to another one. If you try to touch screen and scroll after, you'll see the glitch.

    Issue is reproducible in both of demos.

    opened by richardtop 7
  • Demo with parallax scrolling

    Demo with parallax scrolling

    It's about the demo I've presented today. Have 2 questions to discuss:

    • What is the best name for it - Parallax, ParallaxSlides, MagicMove or something else?
    • Should we add a mark in the name that it's iPad only demo (related to both demos we have)?
    • Do we need to put some text on the each slide or that's enough to have jsut images, animations and so on?
    opened by vadymmarkov 7
  • Tapping on UINavigationController disables swiping

    Tapping on UINavigationController disables swiping

    In both samples, tapping on the UINavigationController's next or previous buttons disables the swiping of the pages.

    The swiping should still be allowed when the user uses one of these nav buttons.

    opened by ghost 6
  • Force to use attributed text

    Force to use attributed text

    While testing I've discovered that setting style attributes via UILabel.appearance() doesn't always work as expected. That's why I've decided to add support of NSAttributedString that makes it even more customisable. Now it's possible to set any attributes you want both for title and text in any model.

    opened by vadymmarkov 6
  • Not compatible with Swift 2.0

    Not compatible with Swift 2.0

    This looks AMAZING. I really want to use it for my latest project but it's got a few issues working with Swift 2.0. I can try to fix it but wondering if you guys are already on it?

    opened by davemen 4
  • Improve: Universal examples

    Improve: Universal examples

    Now both examples are universal apps, so they can be run on both iPhone and iPad. Assets used in Parallax demo are not optimised for iPhone, but I would say it doesn't look that bad 😄

    opened by vadymmarkov 3
  • Button not tappable

    Button not tappable

    I tried adding a tappable UIButton to the example in configureBackground(). It doesn't work as addToBackground is taking the touch events.

    Same issue as in https://stackoverflow.com/questions/24814401/uibutton-targets-not-working-if-a-uiview-is-added-as-a-subview

    opened by ghost 3
  • Add view model to manage positioning, introduce new layers

    Add view model to manage positioning, introduce new layers

    • Add Content - view model to manage positioning.
    • Introduce 2 layers:
      • Scene: everything that is visible across all the pages. Now you can add Content items to the scene and animations to animate views on the specified page.
      • Slides :view controllers for the each page. You can add regular UIViewController or SlideController if you want to use custom positioning and animations of Content view models.
    • Combine appearance and transition animations.
    • Back to autolayout.
    opened by vadymmarkov 3
  • How to dismiss the tutorial ?

    How to dismiss the tutorial ?

    Hi !

    Thanks for this great library ! I'm trying to implement it at the opening of my app but at the end of the tutorial, I want to change the "next" button with a "Close" button or something like that (or putting a big "Start using the app" button in the middle of the screen"...)

    Do you have any hints on how to do that ?

    Thanks !

    opened by Hugoo 2
  • Fix gesture animations

    Fix gesture animations

    Animations on swipe have been broken after this PR https://github.com/hyperoslo/Presentation/pull/102. I think calculations were a bit wrong @chrilith

    opened by vadymmarkov 2
  • Fixed unexpected positioning swiping fast with the finger

    Fixed unexpected positioning swiping fast with the finger

    Hi,

    I found that when swiping with the finger instead of prev/next buttons, the offset may go over the expected bounds and thus, the last position (or alpha value) may ends at an unexpected position.

    Clamping the offset to [0..1] fixed the problem for me, so here is my fix :)

    Thanks!

    opened by chrilith 2
Releases(4.1.2)
Owner
HyperRedink
Connected creativity
HyperRedink
VideoSplashKit - UIViewController library for creating easy intro pages with background videos

VideoSplashKit - Video based UIViewController Introduction Requires iOS 8 or later and Xcode 6.1+ Swift support uses dynamic frameworks and is therefo

Sahin Boydas 1.2k Dec 28, 2022
BWWalkthrough is a simple library that helps you build custom walkthroughs for your iOS App

What is BWWalkthrough? BWWalkthrough (BWWT) is a class that helps you create Walkthroughs for your iOS Apps. It differs from other similar classes in

Yari @bitwaker 2.8k Jan 4, 2023
An animated popover that pops out a given frame, great for subtle UI tips and onboarding.

Animated popover that pops out of a frame. You can specify the direction of the popover and the arrow that points to its origin. Color, border radius

Andrea Mazzini 3k Jan 8, 2023
An iOS framework to easily create simple animated walkthrough, written in Swift.

Intro Overview An iOS framework to easily create simple animated walkthrough, written in Swift. Requirements iOS8 Installation with CocoaPods Intro is

Nurdaulet Bolatov 33 Oct 1, 2021
Configurable animated onboarding screen written programmatically in Swift for UIKit

Configurable animated onboarding screen written programmatically in Swift for UIKit – inspired by many Apple-designed user interfaces in iOS – with Insignia as an example.

Lukman “Luke” Aščić 370 Dec 27, 2022
Create walkthroughs and guided tours (coach marks) in a simple way, with Swift.

Add customizable coach marks into your iOS project. Available for both iPhone and iPad. ⚠️ Instructions 2.0.1 brings a couple of breaking changes, ple

Frédéric Maquin 4.9k Jan 3, 2023
An iOS framework to easily create a beautiful and engaging onboarding experience with only a few lines of code.

Onboard Click Here For More Examples Important Onboard is no longer under active development, and as such if you create any issues or submit pull requ

Mike 6.5k Dec 17, 2022
A simple and attractive AlertView to onboard your users in your amazing world.

AlertOnboarding A simple and attractive AlertView to onboard your users in your amazing world. PRESENTATION This AlertOnboarding was inspired by this

Boisney Philippe 832 Jan 8, 2023
Show overlay and info on app components

SwiftyOverlay App Intro / Instruction component to show data over app UI at run time! Easy to use, Animated and Customizable. Supported Components are

Saeid 80 Aug 29, 2022
Presentation helps you to make tutorials, release notes and animated pages.

Presentation helps you to make tutorials, release notes and animated pages.

HyperRedink 3k Jan 5, 2023
ReleaseNotesKit - a brand new, elegant, and extremely simple way to present the recent version’s release notes to your users

ReleaseNotesKit This is ReleaseNotesKit, a brand new, elegant, and extremely simple way to present the recent version’s release notes to your users. R

Swapnanil Dhol 22 Jun 30, 2022
A Swift script to create a list of links to release notes for package updates.

spi-release-notes release-notes is a Swift script that creates a list of links to release notes for package updates. Running release-notes performs a

Swift Package Index 14 Jul 20, 2022
Swipe between pages with an interactive title navigation control. Configure horizontal or vertical chains for unlimited pages amount.

SlideController is a simple and flexible UI component fully written in Swift. Built using power of generic types, it is a nice alternative to UIPageVi

Touchlane 409 Dec 6, 2022
Swipe between pages with an interactive title navigation control. Configure horizontal or vertical chains for unlimited pages amount.

SlideController is a simple and flexible UI component fully written in Swift. Built using power of generic types, it is a nice alternative to UIPageVi

Touchlane 411 Jan 5, 2023
Standard Notes is a safe place for your notes, thoughts, and life's work

Standard Notes iOS & Android App Standard Notes is a safe place for your notes, thoughts, and life's work. It focuses on being simple, so you don't ha

Standard Notes 842 Dec 31, 2022
This app is a sample app that recognizes specific voice commands such as "make it red", "make it blue", "make it green", and "make it black" and change the background color of the view in the frame.

VoiceOperationSample This app is a sample app that recognizes specific voice commands such as "make it red", "make it blue", "make it green", and "mak

Takuya Aso 3 Dec 3, 2021
Swift Paging is a framework that helps you load and display pages of data from a larger dataset from local storage or over network.

Swift Paging is a framework that helps you load and display pages of data from a larger dataset from local storage or over network. This approach allows your app to use both network bandwidth and system resources more efficiently. It's built on top of Combine, allowing you to harness its full power, handle errors easily, etc.

Gordan Glavaš 12 Dec 9, 2022
Tutorials from sparrowcode.io website. You can add new, translate or fix typos. Also you can add your apps from App Store for free.

Tutorials from sparrowcode.io website. You can add new, translate or fix typos. Also you can add your apps from App Store for free.

Sparrow Code 31 Jan 3, 2023
Tutorials from sparrowcode.io website. You can add new, translate or fix typos. Also you can add your apps from App Store for free.

Страницы доступны на sparrowcode.io/en & sparrowcode.io/ru Как добавить свое приложение Добавьте элемент в json /ru/apps/apps.json. Если ваше приложен

Sparrow Code 30 Nov 25, 2022
MapApp - You can save the location of the places you go on the map and add names and notes

MapApp - You can save the location of the places you go on the map and add names and notes

Yağız Savran 3 Feb 1, 2022