• Stars
    star
    348
  • Rank 121,840 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created almost 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A CocoaPod that simplifies creation of the particle effects.

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.

More Repositories

1

SlidingTutorial-Android

Android Library for making animated tutorials inside your app
Java
2,486
star
2

FanLayoutManager

Using Fan Layout Manager you can implement the horizontal list, the items of which move like fan blades
Java
2,056
star
3

AdaptiveTableLayout

Library that makes it possible to read, edit and write CSV files
Java
1,902
star
4

WaveInApp

Live Audio Equalizer with wave effect
Java
1,785
star
5

MusicBobber

Awesome Audio Widget for any Android Music App
Java
881
star
6

LoopBar

Tap Bar with infinite scrolling. Make the navigation menu right at fingerprints, in a tab bar.
Java
741
star
7

CRNetworkButton

Send Button for iOS
Swift
654
star
8

FireworkyPullToRefresh

Let's try to refresh your data with our library!
Java
641
star
9

BubbleAnimationLayout

You don’t want your apps look and feel boring, do you? Add some bubbles!
Java
577
star
10

CycleMenu

Custom LayoutManager for the inner RecyclerView
Java
575
star
11

CRPageViewController

While a standard page view allows you to navigate between pages by using simple gestures, our component goes further
Objective-C
394
star
12

PlayWidget

Break the monotony and make your music player unique!
Java
366
star
13

Bitutorial

Crumbling tutorial for Android Apps
Java
357
star
14

Android-Marshmallow-Boot-Animation

Java
244
star
15

DroidArt

Android library that allows perform manipulations with text and easily combine it with images.
Kotlin
209
star
16

BlurTutorial

Library for creating blur effects under Android UI elements
Kotlin
155
star
17

flutter_sliding_tutorial

User onboarding library with smooth animation of objects and background colors
Dart
127
star
18

CRRulerControl

Customizable component, created by Cleveroad iOS developers, is aimed at turning a simple ruler into a handy and smart instrument
Objective-C
112
star
19

ARFaceDetection

AR-based library for Android which is capable of detecting faces and overlaying images above the user’s head
Kotlin
52
star
20

slidingtutorial-ios

iOS Library for making animated tutorials inside your app
Objective-C
49
star
21

Bootstrap

This set of libraries is designed to help developers accomplish various tasks easier and faster
Kotlin
40
star
22

cr_calendar

Highly customizable, feature-packed calendar widget for Flutter.
Dart
31
star
23

CRRollingLabel

Objective-C
30
star
24

CRCellCollectionView

With this component, pictures in your apps collection view will look like honeycomb instead of the boring standard variant
Objective-C
28
star
25

ColorDetection

ColorDetection is an app built with OpenCV and using computer vision at its core. It’s able to detect and change colors of objects using a camera of iOS devices.
Objective-C++
22
star
26

cr_logger

Dart
15
star
27

cr_file_saver

Kotlin
3
star
28

CRRefreshControl

2
star
29

cr_json_widget

Dart
2
star
30

CRPlotView

1
star
31

CRPinCodeControl

1
star
32

cr_mentions

Dart
1
star