A CocoaPod that simplifies creation of the particle effects.

Overview

CRParticleEffect Awesome

A CocoaPod that simplifies creation of particle effects. Supplied with UIPanGestureRecognizer subclass.

We know how to add some visual allure to your mobile app and can't wait to share with you. Meet new open-source library for iOS applications created by Cleveroad. CRParticleEffect function will make any pan touch visually attractive and memorable by adding unique particle effect. To know all the advantages of CRParticleEffect library and find out how to implement it into your app, read our blog post - How we created Particle Effect for iOS apps

Watch the animation of Particle Effect on Cleveroad YouTube Channel in HD quality:

Particle Effect for iOS by Cleveroad

Installation

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

pod "CRParticleEffect"

and run pod install in terminal.

#import <CRparticleEffect/CRParticleEffect.h>

Usage

  • CRParticleEffectLayer

    • Init with array of images NSArray<UIImage *>:
      CRParticleEffectLayer *layer = [[CRParticleEffectLayer alloc] initWithImages:@[...]];

      Note: By default CRParticleEffectLayer scales images respecting [UIScreen mainScreen].scale. Set layer's contentScale to change this behavior.

    • Config CAEmitterCell for every image in array:
      CRParticleEffectLayer *layer =
      [[CRParticleEffectLayer alloc] initWithImages:@[...]
                             emitterCellConfigBlock:^(CAEmitterCell * _Nonnull emitterCell, NSInteger index) {
         emitterCell.birthRate = 10 * (index + 1);
      }];
    • Set color for all particle effect's cells with layer's color property
      particleEffectLayer.color = [[UIColor redColor] colorWithAlphaComponent:0.75f]
  • CRMagicPanGestureRecognizer

    • Supports storyboards;
    • Set minimumNumberOfTouches and maximumNumberOfTouches to limit number of active particle effects.
    • Implement CRMagicPanGestureRecognizerDelegate to customize particle effects behavior.
  • CRMagicPanGestureRecognizerDelegate

    - (CRParticleEffectLayer *)gestureRecognizer:(CRMagicPanGestureRecognizer *)gestureRecognizer
                     particleEffectLayerForTouch:(UITouch *)touch
                                       withIndex:(NSUInteger)index
    {
        //Supply particleEffectLayer for each new touch with index
        return [[CRParticleEffectLayer alloc] initWithImages:@[self.images[index]]];
    }
    
    - (void)gestureRecognizer:(CRMagicPanGestureRecognizer *)gestureRecognizer
    willShowParticleEffectLayer:(CRParticleEffectLayer *)particleEffectLayer
                     forTouch:(UITouch *)touch
                    withIndex:(NSUInteger)index
    {
        //Change particles color for every touch with index
        particleEffectLayer.color = self.colors[index];
    }
    
    - (void)gestureRecognizer:(CRMagicPanGestureRecognizer *)gestureRecognizer
    willMoveParticleEffectLayer:(CRParticleEffectLayer *)particleEffectLayer
                     forTouch:(UITouch *)touch withIndex:(NSUInteger)index
    {
        //Update particle effect's attributes during panning (dragging) for specific touch with index
    }

Custom particle images

  • Use white images with transparent background;
  • If you do not supply multiple resolutions set CRparticleEffectLayer's contentScale to 1.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Support

If you have any questions, please contact us for support at [email protected] (email subject: «CRParticleEffect support.»)
or
Use our contacts:
Cleveroad.com
Facebook account
Twitter account
Youtube account
Google+ account
LinkedIn account
Dribbble account

License

CRParticleEffect is available under the MIT license. See the LICENSE file for more info.

You might also like...
A way to easily add Cocoapod licenses and App Version to your iOS App using the Settings Bundle
A way to easily add Cocoapod licenses and App Version to your iOS App using the Settings Bundle

EasyAbout Requirements: cocoapods version 1.4.0 or above. Why you should use Well, it is always nice to give credit to the ones who helped you 😃 Bonu

Demonstration of Cocoapod test targets failing to build when integrated with TestingExtensions 0.2.11.

TestingExtensions0_2_11-Bug Symptoms Open project, hit test (Command+U), TestingExtensions fails to compile with a list of errors appearing to be rela

Ios-card-transition - iOS CocoaPod to create beautiful card transitions
Ios-card-transition - iOS CocoaPod to create beautiful card transitions

CSCardTransition CSCardTransition is a small library allowing you to create wond

Flash-Chat - Firebase Cloud Firestore, TableViews and Cocoapod Dependencies

Flash-Chat Firebase Cloud Firestore, TableViews and Cocoapod Dependencies What I

Thin wrapper around NSURLSession in swift. Simplifies HTTP requests.

SwiftHTTP SwiftHTTP is a thin wrapper around NSURLSession in Swift to simplify HTTP requests. Features Convenient Closure APIs Simple Queue Support Pa

A feature-light wrapper around Core Data that simplifies common database operations.
A feature-light wrapper around Core Data that simplifies common database operations.

Introduction Core Data Dandy is a feature-light wrapper around Core Data that simplifies common database operations. Feature summary Initializes and m

An app that simplifies attendance entry, and uploads recorded attendance to a centralized Google Sheet.
An app that simplifies attendance entry, and uploads recorded attendance to a centralized Google Sheet.

NHSAttendance NHSAttendance is an app that simplifies attendance entry, and uploads recorded attendance to a centralized Google Sheet. This allows for

IconChanger - an app that can change you app's icon. It simplifies your icon changing process
IconChanger - an app that can change you app's icon. It simplifies your icon changing process

IconChanger IconChanger is an app that can change you app's icon. It simplifies your icon changing process. How to use Go to github release Download t

Simplifies iOS user permission requests (location, push notifications, camera, contacts, calendar, photos, etc).

ICanHas Swift 4 library that simplifies iOS user permission requests (push notifications, location, camera, photo library, contacts, calendar). Instal

An extension that simplifies the work with Swift AutoLayout by writing cleaner, more natural and easy-reading code.

Installation For now you're able to clone repo in your project or download ZIP folder manually. git clone https://github.com/votehserxam/AutoLayout.gi

nef💊a toolset to ease the creation of documentation in the form of Xcode Playgrounds
nef💊a toolset to ease the creation of documentation in the form of Xcode Playgrounds

nef, short for Nefertiti, mother of Ankhesenamun, is a toolset to ease the creation of documentation in the form of Xcode Playgrounds. It provides com

CompositionalLayoutDSL, library to simplify the creation of UICollectionViewCompositionalLayout. It wraps the UIKit API and makes the code shorter and easier to read.
CompositionalLayoutDSL, library to simplify the creation of UICollectionViewCompositionalLayout. It wraps the UIKit API and makes the code shorter and easier to read.

CompositionalLayoutDSL CompositionalLayoutDSL is a Swift library. It makes easier to create compositional layout for collection view. Requirements Doc

iOS On-Device Game Cheat Creation/Sharing Platform and Software

CheatManager CheatManager is a mobile platform, used for installation/distribution/creation of mobile game cheats/hacks. This platform is completely d

A simple SwiftUI Application to demonstrate creation of UI using SwiftUI.
A simple SwiftUI Application to demonstrate creation of UI using SwiftUI.

WatchShop_UI A simple SwiftUI Application to demonstrate creation of UI using SwiftUI. How to run the project ? Fork the project. Run the project usin

 It is a music and podcast creation system that enables users to create multiple tracks using AR(Augmented Reality).
It is a music and podcast creation system that enables users to create multiple tracks using AR(Augmented Reality).

AR-Studio It is a music creation system enables users to create multiple tracks using AR(Augmented Reality). Introduction AR Studio turns your iPad, a

Magical Data Modeling Framework for JSON - allows rapid creation of smart data models. You can use it in your iOS, macOS, watchOS and tvOS apps.

JSONModel - Magical Data Modeling Framework for JSON JSONModel allows rapid creation of smart data models. You can use it in your iOS, macOS, watchOS

Magical Data Modeling Framework for JSON - allows rapid creation of smart data models. You can use it in your iOS, macOS, watchOS and tvOS apps.

JSONModel - Magical Data Modeling Framework for JSON JSONModel allows rapid creation of smart data models. You can use it in your iOS, macOS, watchOS

Programmatic creation of NSAttributedString doesn't have to be a pain
Programmatic creation of NSAttributedString doesn't have to be a pain

Tribute let string = NSMutableAttributedString().add("Hello ") { $0.font = .systemFontOfSize(20) $0.color = .redColor() $0.underline = .St

Creation of data model easily, with no headache.

DataFixture Create data models easily, with no headache. DataFixture is a convenient way to generate new data for testing / seeding your Realm Databas

Owner
Cleveroad
Professional web and mobile development company. Full-cycle IT development!
Cleveroad
An iOS library to natively render After Effects vector animations

Lottie for iOS, macOS (and Android and React Native) View documentation, FAQ, help, examples, and more at airbnb.io/lottie Lottie is a mobile library

Airbnb 23.6k Dec 31, 2022
Simple calculation to render cheap water effects.

Water Simple calculation to render cheap water effects. This simple project demonstrates : how to use Metal draw compute shader, or known as 'kernal f

Xue Yu 381 Sep 20, 2022
Various view's effects for iOS, written in Swift. Allows you to animate views nicely with easy to use extensions

Various view's effects for iOS, written in Swift. Allows you to animate views nicely with easy to use extensions. Every animation is randomized. Currently supported animations:

Artur Rymarz 23 Aug 23, 2022
Awesome IOS Styling with SwiftUI, Animation, Effects, Gesture ⭐️

Awesome SwiftUI Styling with SwiftUI ⭐️ This repository is dedicated to IOS styling using SwiftUI. (often using Other Libraries.) I started collecting

SeungYeub Baek 1 Apr 5, 2022
The Effects Library allows developers to create sophisticated and realistic particle systems such as snow, fire, rain, confetti, fireworks, and smoke with no or minimal effort.

The Effects Library allows developers to create sophisticated and realistic particle systems such as snow, fire, rain, confetti, fireworks, and smoke with no or minimal effort.

Stream 182 Jan 6, 2023
URLScheme router than supports auto creation of UIViewControllers for associated url parameters to allow creation of navigation stacks

IKRouter What does it do? Once you have made your UIViewControllers conform to Routable you can register them with the parameters that they represent

Ian Keen 94 Feb 28, 2022
An experiment creating a particle emitter using the new TimelineView and Canvas views in SwiftUI

Particle Emitter An experiment creating a particle emitter using the new Timelin

Emilio Peláez 8 Nov 11, 2022
'The Particle Binder' - Winning WWDC22 Swift Student Challenge submission!

The Particle Binder 'The Particle Binder' - Winning WWDC22 Swift Student Challenge submission! Welcome to The Particle Binder, the particle accelerato

David 8 Sep 26, 2022
My first cocoapod framework

TaniwhaTextField Introduction TaniwhaTextField is a lightweight and beautiful swift textfield framework. It has float label pattern, and also you can

Liguo Jiao 26 Jan 12, 2022