All Projects → itsjohnye → YRipple

itsjohnye / YRipple

Licence: MIT license
iOS Ripple Effect, Xcode10 and Swift5 available

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to YRipple

SwiftGradients
Useful extensions for UIViews and CALayer classes to add beautiful color gradients.
Stars: ✭ 15 (-16.67%)
Mutual labels:  uiview, swift5
BadgeControl
Badge view with controller written in Swift 5.0
Stars: ✭ 53 (+194.44%)
Mutual labels:  uiview, swift5
Swiftfortunewheel
The ultimate spinning wheel view that supports dynamic content and rich customization.
Stars: ✭ 114 (+533.33%)
Mutual labels:  uiview
Quicklayout
Written in pure Swift, QuickLayout offers a simple and easy way to manage Auto Layout in code.
Stars: ✭ 213 (+1083.33%)
Mutual labels:  uiview
Instagramactivityindicator
Activity Indicator similar to Instagram's.
Stars: ✭ 138 (+666.67%)
Mutual labels:  uiview
Gskstretchyheaderview
A generic stretchy header for UITableView and UICollectionView
Stars: ✭ 1,624 (+8922.22%)
Mutual labels:  uiview
Inappviewdebugger
A UIView debugger (like Reveal or Xcode) that can be embedded in an app for on-device view debugging
Stars: ✭ 1,805 (+9927.78%)
Mutual labels:  uiview
Ihequalizerview
An Custom UIView which draws the output of an audio asset in real time.
Stars: ✭ 106 (+488.89%)
Mutual labels:  uiview
IBLayoutConstraint
📏 Configure constraints for each device in Interface Builder with IBLayoutConstraint.
Stars: ✭ 24 (+33.33%)
Mutual labels:  swift5
Closures
Swifty closures for UIKit and Foundation
Stars: ✭ 1,720 (+9455.56%)
Mutual labels:  uiview
Animation Extensions
A set of most commonly used animations like rotation, shake, flip or motion effects. All in one UIView extension.
Stars: ✭ 198 (+1000%)
Mutual labels:  uiview
Flareview
Create Animatic flares around your uiview's. Visit http://stanlyhardy.github.io/FlareView for more info
Stars: ✭ 136 (+655.56%)
Mutual labels:  uiview
Dry View
Complete, standalone view rendering system that gives you everything you need to write well-factored view code.
Stars: ✭ 124 (+588.89%)
Mutual labels:  uiview
Render
UIKit a-là SwiftUI.framework [min deployment target iOS10]
Stars: ✭ 2,150 (+11844.44%)
Mutual labels:  uiview
Swifty360player
iOS 360-degree video player streaming from an AVPlayer.
Stars: ✭ 118 (+555.56%)
Mutual labels:  uiview
MMAdvertScrollView
一个简单、轻量级的swift版公告轮播框架
Stars: ✭ 42 (+133.33%)
Mutual labels:  swift5
Precalc
This repo contains some code which can graph equations in a UIView.
Stars: ✭ 109 (+505.56%)
Mutual labels:  uiview
Anwexpandscrollview
Expand - Collapse Scroll View - Animate With Pinch Gesture
Stars: ✭ 125 (+594.44%)
Mutual labels:  uiview
Uicard
Generic UI for card games like Hearthstone, Magic Arena and Slay the Spire...
Stars: ✭ 142 (+688.89%)
Mutual labels:  uiview
extensions-kit
📦 Collection of Swift+Apple Frameworks extensions for speeding up software development [iOS & iPadOS].
Stars: ✭ 71 (+294.44%)
Mutual labels:  uiview

YRipple

Swift Version Releases Cocoapods GitHub license

YRipple is a framework inherit the legacy from PIRipple.

Now it has been updated to Xcode 10 and Swift 5.

Demo

For more details see Demo project.

Table of Contents

Installation

Manually:

Simply drop YRipple.swift from "Source" folder into your project (make sure to enable "Copy items if needed" and "Create groups").

Cocoapods:

to the Podfile:

"pod YRipple", "~>1.0.0"

then:

$ pod install

in your project:

import YRipple

Useage

UIView-extention

UIView.rippleBorder(location: yourLocation, color: UIColor)
UIView.rippleFill(location: yourLocation, color: UIColor)
for example
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
       super.touchesBegan(touches, with: event)
       for touch: AnyObject in touches {
           let t: UITouch = touch as! UITouch
           let location = t.location(in: self)

           //RIPPLE BORDER
           rippleBorder(location:location, color: UIColor.white)       
       }

run your code after animation

rippleBorder(location:location, color: UIColor.white){
  print("animation completed")
  // add your code here
}

Class-method

YRipple.border(view:UIView, locationInView or absolutePosition:CGPoint, color:UIColor)
YRipple.fill(view:UIView, locationInView or absolutePosition:CGPoint, color:UIColor)

notably:

  • locationInView: CGPoint.Zero is top & left in UIView.
  • absolutePosition: CGPoint.Zero is top & left in UIWindow.
for example
YRipple.border(view:self.view, locationInView:CGPoint.Zero, color:UIColor.white)

run your code after animation

YRipple.border(view:tagetView, locationInView:CGPoint.Zero, color:UIColor.white) {
  print("animation completed")
  //add your code here
}

Customizing

example properties
var option = YRipple.Option()       //mind the capital form

//configuration
option.borderWidth = CGFloat(5.0)
option.radius = CGFloat(30.0)
option.duration = CFTimeInterval(0.4)
option.borderColor = UIColor.white
option.fillColor = UIColor.clear
option.scale = CGFloat(3.0)

YRipple.run(view:self.view, locationInView: CGPoint.Zero, option: option){
  print("animation completed")
  //add your code here
}

//cancel animation
UIView.rippleStop()
YRipple.stop(self.view)

License

YRipple is published under the MIT license. Copyright (c) 2018 itsjohnye.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].