将旋转效果添加到您的 iOS 项目中。支持 blocks。
platform :ios, '7.0'
pod "RFRotate", "~> 1.0"
RFRotate 安装和使用非常简单。查看 示例 获取更多信息,但以下是一个例子。
[RFRotate rotateWithFlex:_greenView withDuration:1 andDegrees:90 andBlock:^{
_greenView.backgroundColor = [UIColor wetAsphaltColor];
} andCompletion:nil];
希望您喜欢它!
+ (void)rotate90:(UIView*)view withDuration:(NSTimeInterval)duration;
// Rotate view 90 degrees
+ (void)rotate180:(UIView*)view withDuration:(NSTimeInterval)duration;
// Rotate view 180 degrees
+ (void)rotate:(UIView*)view withDuration:(NSTimeInterval)duration andDegrees:(NSInteger)degrees;
// Rotate view x degrees for length of time
+ (void)rotateWithFlex:(UIView*)view withDuration:(NSTimeInterval)duration andDegrees:(NSInteger)degrees;
// Rotate the view with an elastically "flex" for time and with x degrees
//These are the same as the above, just with blocks for completion and execution
+ (void)rotate90:(UIView*)view withDuration:(NSTimeInterval)duration andBlock:(void (^)(void))block andCompletion:(void (^)(void))completion;
+ (void)rotate180:(UIView*)view withDuration:(NSTimeInterval)duration andBlock:(void (^)(void))block andCompletion:(void (^)(void))completion;
+ (void)rotate:(UIView*)view withDuration:(NSTimeInterval)duration andDegrees:(NSInteger)degrees andBlock:(void (^)(void))block andCompletion:(void (^)(void))completion;
+ (void)rotateWithFlex:(UIView*)view withDuration:(NSTimeInterval)duration andDegrees:(NSInteger)degrees andBlock:(void (^)(void))block andCompletion:(void (^)(void))completion;
MIT 许可证 (MIT)
版权所有 (c) 2013 Rudd Fawcett
本软件的副本和相关文档文件的副本(以下简称“软件”)的使用权,免费授予任何人,用于在没有任何限制的情况下使用软件,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或出售软件副本的权利,以及允许将软件提供给他人使用,前提是以下条件
上述版权声明和本许可声明应包含在软件的所有副本或实质性部分中。
软件按“现状”提供,不提供任何明示或暗示的保证,包括但不限于适销性、针对特定目的的适用性和非侵权保证。在任何事件中,作者或版权所有者均不对任何主张、索赔或其他责任负责,无论是基于合同、侵权或其他行为,也不论是由软件或其使用或以其他方式产生的。