All Projects → aleksandrshoshiashvili → Awesomespotlightview

aleksandrshoshiashvili / Awesomespotlightview

Licence: mit
Awesome tool for create tutorial walkthrough or coach tour

Programming Languages

swift
15916 projects
swift3
66 projects

Projects that are alternatives of or similar to Awesomespotlightview

Elm Cheat Sheet
An overview of Elm syntax and features
Stars: ✭ 928 (+312.44%)
Mutual labels:  tutorial, education
Data Privacy For Data Scientists
A workshop on data privacy methods for data scientists.
Stars: ✭ 53 (-76.44%)
Mutual labels:  tutorial, education
Learn Vim
Learning Vim and Vimscript doesn't have to be hard. This is the guide that you're looking for.
Stars: ✭ 7,221 (+3109.33%)
Mutual labels:  tutorial, education
Howtodothisinflutter
📄Flutter cheat sheet
Stars: ✭ 219 (-2.67%)
Mutual labels:  tutorial, education
Raspberry Pi Os
Learning operating system development using Linux kernel and Raspberry Pi
Stars: ✭ 11,000 (+4788.89%)
Mutual labels:  tutorial, education
Processing Docs
Processing reference, examples, tutorials, and website
Stars: ✭ 346 (+53.78%)
Mutual labels:  tutorial, education
Plannerapp blazor
PlannerApp is a full client-side application built with Blazor WebAssembly is a course material on AK Academy
Stars: ✭ 36 (-84%)
Mutual labels:  tutorial, education
Learn Vim
Vim 实操教程(Learning Vim)Vim practical tutorial.
Stars: ✭ 1,166 (+418.22%)
Mutual labels:  tutorial, education
Leader Line
Draw a leader line in your web page.
Stars: ✭ 1,872 (+732%)
Mutual labels:  spotlight, markup
What The Splash
Tutorial for building an unsplash image gallery with redux saga :atom:
Stars: ✭ 107 (-52.44%)
Mutual labels:  tutorial, education
Zalo.github.io
A home for knowledge that is hard to find elsewhere
Stars: ✭ 143 (-36.44%)
Mutual labels:  tutorial, education
Godot tutorials
Code and examples for KidsCanCode Godot Tutorials.
Stars: ✭ 119 (-47.11%)
Mutual labels:  tutorial, education
Tutorials
Repository for my YouTube tutorials + code snippets
Stars: ✭ 213 (-5.33%)
Mutual labels:  tutorial, education
Programmieren In Rust
Course page „Programmieren in Rust“, University Osnabrück (German!)
Stars: ✭ 222 (-1.33%)
Mutual labels:  education
Modern Graphql Tutorial
📖 A simple and easy GraphQL tutorial to get started with GraphQL.
Stars: ✭ 219 (-2.67%)
Mutual labels:  tutorial
Townhouse
A multi-tenant Laravel app for listing property rentals
Stars: ✭ 218 (-3.11%)
Mutual labels:  tutorial
Sitepoint Source
Source code for my articles on Sitepoint (since March 2015)
Stars: ✭ 223 (-0.89%)
Mutual labels:  education
Purrr Tutorial
A introduction to purrr
Stars: ✭ 222 (-1.33%)
Mutual labels:  tutorial
30 Seconds Of Php
Short PHP code snippets for all your development needs
Stars: ✭ 2,461 (+993.78%)
Mutual labels:  education
50 Days Of Ml
A day to day plan for this challenge (50 Days of Machine Learning) . Covers both theoretical and practical aspects
Stars: ✭ 218 (-3.11%)
Mutual labels:  tutorial

Platform: iOS 9+ Language: Swift 5 Cocoapods compatible License: MIT

AwesomeSpotlightView is a nice and simple library for iOS written on Swift 5. It's highly customizable and easy-to-use tool. Works perfectly for tutorial or coach in your app.

icon

icon

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Swift Example

ObjC Example

Installation

CocoaPods

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

pod 'AwesomeSpotlightView'

Manually

  • Just drop AwesomeSpotlightView folder in your project.
  • You're ready to use AwesomeSpotlightView!

Usage

override func viewDidLoad() {
    super.viewDidLoad()
    let spotlight1 = AwesomeSpotlight(withRect: CGRect(x: 75, y: 75, width: 100, height: 100), shape: .circle, text: "spotlight1", isAllowPassTouchesThroughSpotlight: true)
    let spotlight2 = AwesomeSpotlight(withRect: CGRect(x: 20, y: 200, width: 130, height: 25), shape: .rectangle, text: "spotlight2")
    let spotlight3 = AwesomeSpotlight(withRect: CGRect(x: 170, y: 50, width: 30, height: 100), shape: .roundRectangle, text: "spotlight3")
    
    let spotlightView = AwesomeSpotlightView(frame: view.frame, spotlight: [spotlight1, spotlight2, spotlight3])
    spotlightView.cutoutRadius = 8
    spotlightView.delegate = self
    view.addSubview(spotlightView)
    spotlightView.start()
}

You can configure AwesomeSpotlightView before you present it using the start method. For example:

spotlightView.continueButtonModel = AwesomeTabButton(title: "Next", font: UIFont.italicSystemFont(ofSize: 16.0), isEnable: true)
spotlightView.skipButtonModel.isEnable = true
spotlightView.skipButtonLastStepTitle = "Finish"
spotlightView.showAllSpotlightsAtOnce = false
spotlightView.start()

Configuration AwesomeSpotlight

rect (CGRect)

The rect of spotlight.

shape (AwesomeSpotlightShape)

Shape of spotlight: .rectangle, .roundRectangle, .circle.

margin (UIEdgeInsets)

Margin for cutout shape. You can set extra space for item with this property.

isAllowPassTouchesThroughSpotlight (Bool)

Set true if you want to allow pass touches through spotlight (allow interaction with view below spotlight) (default: false).

text (String)

The text of the caption.

attributedText (AttributedString)

The attributed text of the caption.

Configuration AwesomeSpotlightView

spotlightsArray ([AwesomeSpotlight])

Modify the spotlights.

spotlightMaskColor (UIColor)

The color of the mask (default: 0,0,0 alpha 0.6).

animationDuration (Double)

Transition animation duration to the next coach mark (default: 0.3).

cutoutRadius (CGFloat)

The cutout rectangle radius (default: 4.0).

maxLabelWidth (Double)

The captions label is set to have a max width of 280px. Number of lines is figured out automatically based on caption contents.

labelSpacing (CGFloat)

Define how far the captions label appears above or below the cutout (default: 35px).

enableArrowDown (Bool)

Icon with Arrow showed between caption text and caption (default: false).

textLabelFont (UIFont)

Fond of caption text label (default: UIFont.systemFont(ofSize: 20.0)).

showAllSpotlightsAtOnce (Bool)

Showed all spotlight at once (at the same time) (default: false).

skipButtonLastStepTitle (String)

This title will show in skip button when user did open last spotlight. (default: Done)

continueButtonModel (AwesomeTabButton)

skipButtonModel (AwesomeTabButton)

You can setup buttons with AwesomeTabButton structure: title, font, backgroundColor and isEnable state.

Default for continueButtonModel: title: "Continue", font: UIFont.boldSystemFont(ofSize: 13.0), isEnable: false

Default for skipButtonModel: title: "Skip", font: UIFont.boldSystemFont(ofSize: 13.0), isEnable: false

AwesomeSpotlightViewDelegate

1. Conform your view controller to the AwesomeSpotlightViewDelegate protocol:

class ViewController: UIViewController, AwesomeSpotlightViewDelegate

2. Assign the delegate to your AwesomeSpotlightView view instance:

spotlightView.delegate = self

3. Implement the delegate protocol methods:

Note: All of the methods are optional. Implement only those that are needed.

  • func spotlightView(_ spotlightView: AwesomeSpotlightView, willNavigateToIndex index: Int)
  • func spotlightView(_ spotlightView: AwesomeSpotlightView, didNavigateToIndex index: Int)
  • func spotlightViewWillCleanup(_ spotlightView: AwesomeSpotlightView, atIndex index: Int)
  • func spotlightViewDidCleanup(_ spotlightView: AwesomeSpotlightView)

Inspired by

Author

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].