Latest 0.1.0
Homepage https://github.com/Insofan/HXFloatingHearts
License MIT
Platforms ios 8.0
Dependencies HXTool
Frameworks UIKit
Authors

CI Status
Version
License
Platform

Example

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

Requirements

iOS 6.0

ScreenShot

i1XRI.gif

Installation

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

pod "HXFloatingHearts"

Usage

1.Set view.userInteractionEnabled

self.view.userInteractionEnabled = YES;

2.Add tap gesture.

//添加轻触
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(floatingHeart)];
[self.view addGestureRecognizer:tapGesture];

3.Animate heart

//启动动画
- (void)floatingHeart {
    HXFloatingHearts *heart = [[HXFloatingHearts alloc] initWithWidth:36 center:CGPointMake(138, self.view.bounds.size.height - 28)];
    heart.totalAnimationDuration = 8;
    [self.view addSubview:heart];
    CGPointMake(38, self.view.bounds.size.height - 36/2.0 - 10);
    [heart floatingHeartsWithView:self.view];
}

4.More

It support circle shape.Also support random circle or heart shape. Just add one line.

//Circle
heart.isCircle = true;

or random shape

//Random shape
heart.isRandomShape = true;

Author

Insofan, [email protected]

It inspired by saidmarouf/FloatingHearts,thanks for it.

License

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

Latest podspec

{
    "name": "HXFloatingHearts",
    "version": "0.1.0",
    "summary": "A floating heart and circle animation framework.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/Insofan/HXFloatingHearts",
    "screenshots": "http://storage1.imgchr.com/i1XRI.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Insofan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Insofan/HXFloatingHearts.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "HXFloatingHearts/Classes/**/*",
    "frameworks": "UIKit",
    "dependencies": {
        "HXTool": [
            "~> 0.1.2"
        ]
    }
}

Pin It on Pinterest

Share This