摘要:
CATransition转场动画概述简介CATransition又称转场动画,是CAAnimation的子类,可以直接使用转场动画主要用于为图层提供移入/移出屏幕的动画效果转场动画常见的应用是UINavigationController注意事项转场动画的默认过渡方式为淡出方式(kCATransiti... 阅读全文
摘要:
今天和大家分享一下CALayer和UIView的区别:1.UIKit使用UIResponder作为响应对象,来响应系统传递过来的事件并进行处理。UIApplication、UIViewController、UIView、和所有从UIView派生出来的UIKit类(包括UIWindow)都直接或间接地... 阅读全文
摘要:
CALayer *superLayer=self.view.layer; //创建CALayer CALayer *subLayer =[CALayer layer]; //添加到父图层 [superLayer addSublayer:subLayer]; //尺寸 subLaye... 阅读全文
摘要:
CALayer *superLayer=self.view.layer; //创建CALayer CALayer *subLayer =[CALayer layer]; //添加到父图层 [superLayer addSublayer:subLayer]; //尺寸 subLayer.bounds ... 阅读全文
摘要:
实现效果操作步骤绘制一个矩形框,弹出一个alertView,提示是否保存图片点击"是",将图片保存到相册在相册中查看保存的图片效果图实现思路在控制器的view上添加一个imageView,设置图片在控制器的view上添加一个pan手势跟踪pan手势,绘制一个矩形框(图片的剪切区域)在pan手势结束时... 阅读全文
摘要:
- (void)awakeFromNib{ iMV = [[UIImageView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; iMV.image = [UIImage imageNamed:@"c"]; [self addSu... 阅读全文
摘要:
概述简介CAKeyframeAnimation又称关键帧动画CAKeyframeAnimation是抽象类CAPropertyAnimation的子类,可以直接使用通过values与path两个属性指定动画属性注意事项若指定了path属性,则values属性将被忽略CABasicAnimation相... 阅读全文
摘要:
{// 播放器 AVPlayer *player;// 承载视图 UIView *contentView;// 控件承载视图 UIView *controlView;// 进度条 UISlider *progressSlider;}@end@implementation ViewCon... 阅读全文
摘要:
//获取上下文 CGContextRef context =UIGraphicsGetCurrentContext(); //线条加粗 CGContextSetLineWidth(context , 5);//创建路径并获取句柄 CGMutablePathRef path =CGPathCreate... 阅读全文
摘要:
//获取上下文 CGContextRef context =UIGraphicsGetCurrentContext(); //线条加粗 CGContextSetLineWidth(context , 5); //设置背景颜色 [[UIColor grayColor]set]; UIRectFill(... 阅读全文