Giter VIP home page Giter VIP logo

phocalargha's Introduction

PhocaLargha

Version License Platform

About

This library makes it easy to display the walkthrough in the application simply by writing a few lines of code. You can customize various color backgrounds, titles, buttons, etc., and you can also define completion handlers.

Requirements

  • iOS9*

Installation

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

pod 'PhocaLargha'

Get Started

How to display the simplest alert view.

let popNavi = PopNavi()
let firstViewComponent = BaseViewComponent(viewType: dialogSize, topComponent: topComponent,
footerComponent: lastFooterComponent, image: firstImage,
baseViewColor: dialogColor)

popNavi.setBaseView(baseViewComponent: firstViewComponent, isLastView: true)
popNavi.configureNavigation()
popNavi.slideUp(duration: 0.7)

It is also possible to display walkthroughs using multiple custom views.

let firstViewComponent = BaseViewComponent(viewType: dialogSize, topComponent: topComponent,
footerComponent: footerComponent, image: firstImage,
baseViewColor: dialogColor)
let secondViewComponent = BaseViewComponent(viewType: dialogSize, topComponent: topComponent,
footerComponent: footerComponent, image: secondImage,
baseViewColor: dialogColor)
let thirdViewComponent = BaseViewComponent(viewType: dialogSize, topComponent: topComponent,
footerComponent: lastFooterComponent, image: thirdImage,
baseViewColor: dialogColor)
let popNavi = PopNavi()

popNavi.setBaseView(baseViewComponent: firstViewComponent, isLastView: false)
popNavi.setBaseView(baseViewComponent: secondViewComponent, isLastView: false)
popNavi.setBaseView(baseViewComponent: thirdViewComponent, isLastView: true)
popNavi.configureNavigation()
popNavi.slideUp(duration: 0.7)

Customize

There are two customization setting methods in this library.

1. PopNaviConfigureOption

It is a structure that customizes the component that is placed mainly in the background of the custom view.

let popNavi = PopNavi()
popNavi.configureOption.xxx = yyy // Look at the following

.backgroundColor // Change background color. The default is black background.
.backgroundAlpha // Change background alpha. The default is 0.5.
.pageControlColor // Specify the color of the page control The default is orange.
.isDismissibleForTap // Determining whether to close view when tapping background. The default is true.
.shouldDisplayPageControl // Display judgment of page control.
.backgroundViewGradientType // Specify the gradation style of the background. The default is black background.
.completion // Set handler when view is closed.

2. ComponentConfigure

It is a structure that mainly configures components of custom view.

let firstViewComponent = BaseViewComponent(viewType: ViewType,
cornerRadius: CGFloat = 10,
topComponent: TopComponent? = nil,
footerComponent: FooterComponent? = nil,
image: UIImage,
baseViewColor: UIColor = .white)

viewType // You can choose 3 different custom view sizes.
cornerRadius // Specify the corner radius of the custom view.
topComponent // A component for displaying the title of a custom view. If nothing is specified, this component will not be displayed.
footerComponent // Component for displaying buttons at the bottom of the custom view. It will not be displayed if nothing is specified.
image // Set the image to be displayed in the middle of the custom view.
baseViewColor // Set color scheme of custom view.

Author

takuyama29

phocalargha's People

Contributors

yamataku29 avatar bannzai avatar

Watchers

Carabineiro 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.