All Projects → jinht → ShopCarAnimation

jinht / ShopCarAnimation

Licence: MIT license
购物车类的抛物线动画(支持上抛或者下抛) && 阻尼动画(弹球动画)

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to ShopCarAnimation

Applozic Ios Sdk
iOS Real Time Chat & Messaging SDK
Stars: ✭ 104 (+89.09%)
Mutual labels:  ios-sdk
Mycoretextlabel
图文混排 , 实现图片文字混排 , 可显示常规链接比如网址,@,#话题#,手机号 , 邮箱号等 , 可以自定义链接字,设置关键字高亮等功能 . 适用于微博,微信,IM聊天对话等场景 . 实现这些功能仅用了几百行代码,耦合性也较低
Stars: ✭ 192 (+249.09%)
Mutual labels:  ios-sdk
CrossMobile
Create native iOS, Android, Windows Phone and Desktop applications in Java. Write it once, and produce sophisticated multiplatform applications.
Stars: ✭ 48 (-12.73%)
Mutual labels:  ios-sdk
Floatingball
悬浮球/悬浮按钮/辅助按钮(类似于iOS系统自带的AssistiveTouch/京东/聚划算/建行等的辅助按钮)
Stars: ✭ 126 (+129.09%)
Mutual labels:  ios-sdk
Docviewer
文档/文件查看器(支持本地或者其他app分享过来的word、excel、pdf、rtf等格式文件)
Stars: ✭ 155 (+181.82%)
Mutual labels:  ios-sdk
Firebase Ios Sdk
Firebase iOS SDK
Stars: ✭ 3,309 (+5916.36%)
Mutual labels:  ios-sdk
Swiftaa
The most comprehensive collection of accurate astronomical algorithms in (C++, Objective-C and) Swift.
Stars: ✭ 91 (+65.45%)
Mutual labels:  ios-sdk
tuyasmart home ios sdk
Tuya Smart iOS Home SDK
Stars: ✭ 48 (-12.73%)
Mutual labels:  ios-sdk
Rdvideoeditsdk For Ios
iOS Video Edit SDK; iOS Video Edit SDK: Video Cut, Video Join, Video Watermark, Video Subtitle, Video Rotate...
Stars: ✭ 182 (+230.91%)
Mutual labels:  ios-sdk
iOS-Monitor-Resources
对各厂商的 iOS SDK 性能监控方案的整理和收集后的资源
Stars: ✭ 31 (-43.64%)
Mutual labels:  ios-sdk
Mpcolortools
A collection of tools for handling colors on iOS SDK
Stars: ✭ 128 (+132.73%)
Mutual labels:  ios-sdk
Vassonic
VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.
Stars: ✭ 11,466 (+20747.27%)
Mutual labels:  ios-sdk
extensions-kit
📦 Collection of Swift+Apple Frameworks extensions for speeding up software development [iOS & iPadOS].
Stars: ✭ 71 (+29.09%)
Mutual labels:  ios-sdk
Guidepages
引导页/首次安装引导页/渐变引导页/APP介绍页/功能介绍页
Stars: ✭ 119 (+116.36%)
Mutual labels:  ios-sdk
unity-arkit-charts-demo
iOS 11 ARKit Charts Demo
Stars: ✭ 13 (-76.36%)
Mutual labels:  ios-sdk
Swiftcocoadsl
An easy way to write iOS UI
Stars: ✭ 103 (+87.27%)
Mutual labels:  ios-sdk
Instabug Ios
In-app feedback and bug reporting tool for apps.
Stars: ✭ 244 (+343.64%)
Mutual labels:  ios-sdk
iOS-10-Sampler
Code examples for the new features of iOS 10.
Stars: ✭ 72 (+30.91%)
Mutual labels:  ios-sdk
connect-sdk-client-ios
Ingenico Connect iOS Objective-C Client SDK
Stars: ✭ 17 (-69.09%)
Mutual labels:  ios-sdk
shake-ios
Bug and crash reporting SDK for iOS apps.
Stars: ✭ 25 (-54.55%)
Mutual labels:  ios-sdk

JhtShopCarAnimation

Contents

购物车抛物线动画

阻尼动画

needed to pay attention.

1. podfile

platform:ios, '8.0'

target '*****' do

pod 'JhtAnimationTools'
        
end

2.这是一个轻量级的动画文件,可以实现购物车的上抛 && 下抛动画;此外我还写了一个简单的阻尼动画,供大家交流使用


3.使用起来比较方便,只需导入 JhtAnimationTools.h 头文件即可

(1) 购物车动画

/**
  * rect: 动画开始的坐标; 如果rect传CGRectZero,则用默认开始坐标;
  * imageView: 动画对应的imageView;
  * view : 在哪个view上显示 (一般传self.view);
  * lastPoint: 动画结束的坐标点;
  * controlPoint: 动画过程中抛物线的中间转折点;
  * per: 决定控制点,起点和终点X坐标之间距离 1/per; 注:如果per <= 0, 则控制点由controlPoint决定,否则控制点由per决定;
  * expandAnimationTime: 动画变大的时间
  * narrowAnimationTime: 动画变小的时间
  * animationValue: 动画变大过程中,变为原来的几倍大
  * 注意 : 如果动画过程中,你不想让图片变大变小,保持原来的大小运动,传值如下:
           expandAnimationTime:0.0f
           narrowAnimationTime : 动画总共的时间;
           animationValue:1.0f
*/
 - (void)aniStartShopCarAnimationWithStartRect:(CGRect)rect withImageView:(UIImageView *)imageView withView:(UIView *)view withEndPoint:(CGPoint)lastPoint withControlPoint:(CGPoint)controlPoint withStartToEndSpacePercentage:(NSInteger)per withExpandAnimationTime:(CFTimeInterval)expandAnimationTime withNarrowAnimationTime:(CFTimeInterval)narrowAnimationTime withAnimationValue:(CGFloat)animationValue;

(2) 阻尼动画

  • 创建阻尼动画的View
/** 获得的阻尼动画的View
  * view:黑色背景View的父view(例如:self.view);
  * frame:是这个阻尼View的坐标
  * isBlack:yes 需要出现黑色背景, no不需要
  * bgColor:背景颜色
 */
 - (UIView *)aniDampingAnimationWithFView:(UIView *)view withFrame:(CGRect)frame withBackgroundColor:(UIColor *)bgColor isNeedBlackView:(BOOL)isBlack;
  • 阻尼动画相关使用方法
/** 开始动画阻尼动画 */
- (void)aniStartDampingAnimation;
/** 关闭阻尼动画 */
- (void)aniCloseDampingAnimation;
/** 获得阻尼动画的黑色背景 */
- (UIView *)aniGetDampingBlackView;

(3) 动画的代理方法

/**
  * type == 0 购物车的动画
  * type == 1 阻尼动画
  * isStop: Yes动画结束, No动画过程中
 */
 - (void)JhtAnimationWithType:(NSInteger)type isDidStop:(BOOL)isStop;

Remind

  • ARC
  • iOS >= 8.0
  • iPhone \ iPad

Hope

  • If you find bug when used,Hope you can Issues me,Thank you or try to download the latest code of this framework to see the BUG has been fixed or not
  • If you find the function is not enough when used,Hope you can Issues me,I very much to add more useful function to this framework ,Thank you !
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].