Coder Social home page Coder Social logo

gecco's Introduction

Gecco

Pod Version Pod Platform Pod License

Simply highlight items for your tutorial walkthrough, written in Swift

Gecco means Moonlight in Japanese.

Demo

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.

gecco's People

Contributors

bannzai avatar fujiwarakota avatar jstnheo avatar koutalou avatar lfarah avatar nhosoya avatar readmecritic avatar robhor avatar sairamkotha avatar toastersocks avatar xai3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gecco's Issues

Cocoapods update

The project's been updated for Swift 4.0, but this update has not been pushed to CocoaPods yet.

For anyone seeking a workaround:
pod 'Gecco', :git => 'https://github.com/yukiasai/Gecco.git'

Swift 4

Need to support swift 4.0.

Line 80~83 in SportlightViewController.swift
fileprivate func setupTapGesture() { let gesture = UITapGestureRecognizer(target: self, action: #selector(SpotlightViewController.viewTapped(_:))); view.addGestureRecognizer(gesture) }

Need to add @objc to expose this instance method to Objective-C

Use Gecco swift2.3 ?

Hello,

I have many errors when i compile my projet with Xcode8. (102 exactly)
There is a release or a tag for use with swift gecco 2.3 and not 3.0?
Thanks

Swift 3

it'd be cool to have a swift 3 version, if you have any interest to create a branch i would like to help with that.

enable interaction

I want to interact with uiview added in firstViewController with Gecco it's possible ?
like candy crush saga tutorial

iPhone X support?

Hi yukiasai,
I like Gecco! I have question about iPhone X support, it there any planning to solve the y-offset issue? I attached 2 snapshots from iPhone X simulator running the demo app.

simulator screen shot - iphone x - 2018-05-19 at 13 04 17
Uploading Simulator Screen Shot - iPhone X - 2018-05-19 at 13.04.13.png…

carthage issue

I'm new to Carthage, so this might be my problem but I hope not.
When I build Carthage with carthage update --platform iOS
All my dependencies build fine except Gecco, which reports this error:
*** Skipped building Gecco due to the error: Dependency "Gecco" has no shared framework schemes for any of the platforms: iOS
Halp!

Cannot compile with xcode 10 and swift 4.2

gecco_error_1

This is the error I got when trying to do carthage update on Geccode:

user$ carthage update Gecco --platform iOS --no-use-binaries --verbose
*** Fetching Cartography
*** Fetching Gecco
...
*** Checking out Gecco at "1.0.0"
*** Building scheme "Gecco" in Gecco.xcodeproj
/usr/bin/xcrun xcodebuild -project /Users/elmer/Houzcall/ios-apps/ios/Carthage/Checkouts/Gecco/Gecco.xcodeproj -scheme Gecco -configuration Release -derivedDataPath /Users/elmer/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/Gecco/1.0.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/09/pqh2l2ds1jl2yb3y1ll7nj480000gn/T/Gecco SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/elmer/Houzcall/ios-apps/ios/Carthage/Checkouts/Gecco)User defaults from command line:
    IDEArchivePathOverride = /var/folders/09/pqh2l2ds1jl2yb3y1ll7nj480000gn/T/Gecco
    IDEDerivedDataPathOverride = /Users/elmer/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/Gecco/1.0.0

Build settings from command line:
    CARTHAGE = YES
    CLANG_ENABLE_CODE_COVERAGE = NO
    CODE_SIGN_IDENTITY =
    CODE_SIGNING_REQUIRED = NO
    GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
    ONLY_ACTIVE_ARCH = NO
    SDKROOT = iphoneos12.0
    SKIP_INSTALL = YES
    STRIP_INSTALLED_PRODUCT = NO

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
warning: duplicate output file '/Users/elmer/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/Gecco/1.0.0/Build/Intermediates.noindex/ArchiveIntermediates/Gecco/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Gecco.framework/Info.plist' on task: ProcessInfoPlistFile /Users/elmer/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/Gecco/1.0.0/Build/Intermediates.noindex/ArchiveIntermediates/Gecco/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Gecco.framework/Info.plist /Users/elmer/Houzcall/ios-apps/ios/Carthage/Checkouts/Gecco/Gecco/Info.plist (in target 'Gecco')

Build system information
error: Multiple commands produce '/Users/elmer/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/Gecco/1.0.0/Build/Intermediates.noindex/ArchiveIntermediates/Gecco/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Gecco.framework/Info.plist':
1) Target 'Gecco' (project 'Gecco') has copy command from '/Users/elmer/Houzcall/ios-apps/ios/Carthage/Checkouts/Gecco/GeccoTests/Info.plist' to '/Users/elmer/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/Gecco/1.0.0/Build/Intermediates.noindex/ArchiveIntermediates/Gecco/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Gecco.framework/Info.plist'
2) Target 'Gecco' (project 'Gecco') has process command with output '/Users/elmer/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/Gecco/1.0.0/Build/Intermediates.noindex/ArchiveIntermediates/Gecco/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Gecco.framework/Info.plist'

** ARCHIVE FAILED **

Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -project /Users/elmer/Houzcall/ios-apps/ios/Carthage/Checkouts/Gecco/Gecco.xcodeproj -scheme Gecco -configuration Release -derivedDataPath /Users/elmer/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/Gecco/1.0.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/09/pqh2l2ds1jl2yb3y1ll7nj480000gn/T/Gecco SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/elmer/Houzcall/ios-apps/ios/Carthage/Checkouts/Gecco)

This usually indicates that project itself failed to compile.

Does anybody know how to resolve this?

Regards,
Elmer

Creating a new tag with Swift 4?

Hey @YukiAsai are you creating a tag with the Swift 4 changes? In our project we just used version from tags and I would like to use this library with the Swift 4 changes.

Thanks.

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.