如果你尝试,并设置缩放比例为零,你会得到这个消息:: CGAffineTransformInvert: singular matrix.
[UIView
animateWithDuration:0.5
animations:^{
CGAffineTransform newTransform =
CGAffineTransformScale(my...
分类:
移动开发 时间:
2014-08-09 15:56:58
阅读次数:
584
绘制虚线的UIViewCAShapeLayer配合贝塞尔曲线可以绘制曲线,笔者继承了一个UIView的子类,并将改子类的backedLayer替换为CAShapeLayer,以此来实现绘制虚线的效果.绘制出各种虚线的效果图:实现的源码:LineDashView.h 与 LineDashView.m/...
分类:
其他好文 时间:
2014-08-09 00:00:16
阅读次数:
493
//***简单动画 [UIView animateWithDuration:3 animations:^{// _animationView.center = CGPointMake(arc4random()%320, arc4random()%480);//改变中心点// _animat...
分类:
移动开发 时间:
2014-08-07 22:49:55
阅读次数:
281
AppDelegate * app=(AppDelegate *)[[UIApplication sharedApplication]delegate]; UIWindow *window = app.window; [UIView animateWithDuration:1.0f a...
分类:
移动开发 时间:
2014-08-07 00:23:07
阅读次数:
208
nsobject--uiresponder--uiviewuiresponder类定义了一些操作uiview有三个属性: frame, bounds, centercenter用于改变控件位置, bounds 用于改变控件大小UILabel控件:类似于c#的label。CGRect frame = ...
分类:
其他好文 时间:
2014-08-06 14:16:01
阅读次数:
196
嗯,直接上代码!!!!这是.h文件的#import @interface UIView (AboutKeyboard)@property (nonatomic) CGFloat moveDistince;@property (nonatomic) UIView *moveView;/* *指定一.....
分类:
移动开发 时间:
2014-08-05 18:46:39
阅读次数:
275
转自http://geeklu.com/2012/09/animation-in-ios/二.CALayer及时间模型我们都知道UIView是MVC中的View.UIView的职责在于界面的显示和界面事件的处理.每一个View的背后都有一个layer(可以通过view.layer进行访问),laye...
分类:
移动开发 时间:
2014-08-05 18:10:09
阅读次数:
233
基本架构:默认情况下Auto LayOut是开启的,直接添加UIView在UIScrollView是无法滑动的,关闭Auto LayOut才可以:(建议开启)第二步:用XIB搭建一个自定义的ContentView将自定义的UIView与UIScrollView进行绑定OK;;;;;
分类:
其他好文 时间:
2014-08-05 15:46:49
阅读次数:
177
1,@class seatObject;typedef void (^touchButtom) (seatObject *);@interface seatObject : UIView{}@property (nonatomic ,strong)touchButtom block;@end2,@i...
分类:
其他好文 时间:
2014-08-05 15:18:59
阅读次数:
138
1.superview获得自己的父控件对象@property(nonatomic,readonly)UIView *superview2.subviews获得自己的所有子控件对象@property(nonatomic,readonly,copy)NSArray *subviews; int c...
分类:
其他好文 时间:
2014-08-05 00:21:18
阅读次数:
188