DGThumbUpButton
Description
Drop-in button control with with particle effects similar to the Like button in Facebook Paper.
带有粒子扩散效果的点赞按钮,模仿Facebook Paper中的Like Button。实现思路可以查看我的博文:If you like me, Thumb Up!。喜欢的话可以Star下
Screenshot
Setup
Install with CocoaPods by adding the following to your Podfile:
platform :ios, '5.0'
pod 'DGThumbUpButton', '~> 0.0.1'
or add manually:
Add DGThumbUpButton.h
to your project.
Basic Examples
DGThumbUpButton *btn = [[DGThumbUpButton alloc] init];
[self.view addSubview: btn];
Q&A
Q: I use CocoaPods to setup the DGThumbUpButton
, and I write code as Basic Examples, but I can't get a Button in the View.
A: When I test CocoaPods, I found this situation. I advise to move .png
files in Assets.xcassets
.
├── Podfile
├── Podfile.lock
├── Pods
│ ├── DGThumbUpButton
│ │ ├── DGThumbUpButton
│ │ │ ├── DGExplodeAnimationView.h
│ │ │ ├── DGExplodeAnimationView.m
│ │ │ ├── DGThumbUpButton.h
│ │ │ ├── DGThumbUpButton.m
│ │ │ ├── Like-Blue.png
│ │ │ ├── Like-PlaceHold.png
│ │ │ └── Like-Sparkle.png
And change all Like-Blue.png
, Like-PlaceHold.png
and Like-Sparkle.png
files' name to your custom image set name in your Assets.xcassets
.
License
DGThumbUpButton is under the MIT license.