bannzai/Gecco
关于
使用 Swift 编写,简单高亮教程演示中的项目。
学习与教育实测星标增长
- 24小时
- 0
- 7天
- -1
- 15天
- 0
- 1个月
- 0
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Gecco
Simply highlight items for your tutorial walkthrough, written in Swift
Gecco means Moonlight in Japanese.

Usage
Basic
Basically instantiate a SpotlightViewController and present via UIViewController.present(_:animated:completion) and call SpotlightViewController.spotlight.appear(_:)` with SpotlightType.
import Gecco
class 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.
spotlightViewController.spotlightView.appear(Spotlight.Oval(center: view.center, diameter: 100))

Rect
Rect is a rectangle drawn by specifying the width and height.
spotlightViewController.spotlightView.appear(Spotlight.Rect(center: view.center, size: CGSize(width: 200, height: 100)))

RoundedRect
RoundedRect is a rectangle with corner radius.
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 and SpotlightViewDelegate.
For example
// Hook events for SpotlightViewControllerDelegate
spotlightViewController.delegate = self
// Hook events for SpotlightViewDelegate
spotlightViewController.spotlightView.delegate = self
Example
Please refer to GeccoExample.
Installation
CocoaPods
pod 'Gecco'
Carthage
github "yukiasai/Gecco"
License
Gecco is released under the MIT license. See LICENSE for details.
探索相关项目
加载中…