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
CATransition *animation = [CATransition animation]; animation.delegate = self; animation.duration = 0.5f; animation.timingFunction = UIVi...
分类:
其他好文 时间:
2014-08-04 13:25:57
阅读次数:
203
今天在做一个UIButton显示动画的时候,遇到一个问题,就是在移动的时候 ,需要相应它的点击时间(click)通过CAKeyframeAnimation 来移动UIButton的layer ,效果可以,但是就是无法点击。解决方法:将UIButton 的 userinterfaceenable 设置...
分类:
移动开发 时间:
2014-08-04 10:33:56
阅读次数:
181
对Core Animation来说,不管是显式动画还是隐式动画,对其设置frame都是立即设置的,比如说给一个UIView做移动动画,虽然看起来frame在持续改变,但其时它的frame已经是最终值了,这种情况下,哪怕这个UIView是UIButton的实例,其触发touch事件的范围还是最终frame的地方。...
分类:
移动开发 时间:
2014-08-03 15:18:55
阅读次数:
194