Giter VIP home page Giter VIP logo

vvcoachmarks's Introduction

Coach marks

Add customizable coach marks into your iOS project. Available for both iPhone and iPad.

Table of contents

Overview

VVCoachMarks Demo

Requirements

  • Xcode 11 / Swift 5+
  • iOS 10.0+

Asking Questions

Asking questions

If you need help with something in particular, ask a question in the mail.

Installation

CocoaPods

Add VVCoachMarks to your Podfile:

platform :ios, '10.0'
use_frameworks!

pod 'VVCoachMarks'

Then, run the following command:

$ pod install

Usage

Getting started

Open up the controller for which you wish to display coach marks and for example create VVCoachMark, then use VVCoachMarkManager shared instance and show coach mark passing it to showCoachMark() function.

class DefaultViewController: UIViewController {
    override func viewDidAppear(_ animated: Bool) {
            super.viewDidAppear(animated)
            
            let coachMarkManager = VVCoachMarkManager.shared
            coachMarkManager.delegate = self
            let coachMark = VVCoachMark(for: self.button, in: self.view, coachMarkPosition: .topCenter, message: "Coach mark message")
            coachMarkManager.showCoachMark(coachMark)
        }
}

Delegate

VVCoachMarkManagerDelegate declares two optional methods.

The first one lets you provide custom body view for your coach mark or default view will be used.

func viewForCoachMarkBody() -> UIView? {
    return isCustomBody ? UIImageView(image: UIImage(named: "1.jpg")) : nil
}

The second one lets you provide custom arrow view for your coach mark or default view will be used.

let pointOfInterest = UIView()

func viewForCoachMarkArrow() -> UIView? {
    return !isCustomBody ? UIImageView(image: #imageLiteral(resourceName: "arrow")) : nil
}

License

VVCoachMarks is released under the MIT license. See LICENSE for details.

vvcoachmarks's People

Contributors

valentinevv avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.