Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xai3/Gecco
Simply highlight items for your tutorial walkthrough, written in Swift
https://github.com/xai3/Gecco
Last synced: 12 days ago
JSON representation
Simply highlight items for your tutorial walkthrough, written in Swift
- Host: GitHub
- URL: https://github.com/xai3/Gecco
- Owner: xai3
- License: mit
- Fork: true (bannzai/Gecco)
- Created: 2020-09-16T10:46:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-16T10:52:19.000Z (over 4 years ago)
- Last Synced: 2024-11-26T13:42:31.072Z (25 days ago)
- Language: Swift
- Homepage:
- Size: 756 KB
- Stars: 16
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - Gecco - Spotlight view for iOS. (Walkthrough / Intro / Tutorial / Web View)
- awesome-swift - Gecco - Spotlight view for iOS. (Libs / UI)
- fucking-awesome-swift - Gecco - Spotlight view for iOS. (Libs / UI)
README
# Gecco
## Note
⚠️⚠️ yukiasai/Gecco was transferred to [bannzai/Gecco](https://github.com/bannzai/Gecco). This repository is forked. ⚠️⚠️
## Overview
[![Pod Version](http://img.shields.io/cocoapods/v/Gecco.svg?style=flat)](http://cocoadocs.org/docsets/Gecco/)
[![Pod Platform](http://img.shields.io/cocoapods/p/Gecco.svg?style=flat)](http://cocoadocs.org/docsets/Gecco/)
[![Pod License](http://img.shields.io/cocoapods/l/Gecco.svg?style=flat)](http://opensource.org/licenses/MIT)Simply highlight items for your tutorial walkthrough, written in Swift
Gecco means Moonlight in Japanese.
![Demo](https://cloud.githubusercontent.com/assets/6880730/12470510/2d1cb602-c038-11e5-8095-a2a0d77f99db.gif)
## Usage
### Basic
Basically instantiate a SpotlightViewController and present via `UIViewController.present(_:animated:completion) and call `SpotlightViewController.spotlight.appear(_:)` with SpotlightType.
``` swift
import Geccoclass ViewController: UIViewController {
func showSpotlight() {
let spotlightViewController = SpotlightViewController()
present(spotlightViewController, animated: true, completion: nil)
spotlightViewController.spotlightView.appear(Spotlight.Oval(center: view.center, diameter: 100))
}
}
```#### Supported SpotlightType
Gecco provide some SpotlightType as default implemantation.Oval
`Oval` displays a perfect circle.
```swift
spotlightViewController.spotlightView.appear(Spotlight.Oval(center: view.center, diameter: 100))
```Rect
`Rect` is a rectangle drawn by specifying the width and height.
```swift
spotlightViewController.spotlightView.appear(Spotlight.Rect(center: view.center, size: CGSize(width: 200, height: 100)))
```RoundedRect
`RoundedRect` is a rectangle with corner radius.
```swift
spotlightViewController.spotlightView.appear(Spotlight.RoundedRect(center: view.center, size: CGSize(width: 200, height: 100), cornerRadius: 8))
```### Advanced
**Gecco** publish some delegate methods for hook each events about SpotlightViewController and SpotlightView.
If you want to write adavanced feature, you can write to define SpotlightViewControllerDelegate or SpotlightViewDelegate.
See [SpotlightViewControllerDelegate](https://github.com/yukiasai/Gecco/blob/9791f0c050572f43d54a7f13dc081a165d99e9f3/Classes/SpotlightViewController.swift#L11) and [SpotlightViewDelegate](https://github.com/yukiasai/Gecco/blob/9791f0c050572f43d54a7f13dc081a165d99e9f3/Classes/SpotlightView.swift#L11).For example
```swift
// Hook events for SpotlightViewControllerDelegate
spotlightViewController.delegate = self// Hook events for SpotlightViewDelegate
spotlightViewController.spotlightView.delegate = self
```### Example
Please refer to [GeccoExample](https://github.com/yukiasai/Gecco/tree/master/GeccoExample).## Installation
#### CocoaPods
```
pod 'Gecco'
```
#### Carthage```
github "yukiasai/Gecco"
```## License
Gecco is released under the MIT license. See LICENSE for details.