如果视图的autoresizesSubviews属性声明被设置为YES,则其子视图会根据autoresizingMask属性的值自动进行尺寸调整。简单配置一下视图的自动尺寸调整掩码常常就能使应用程序得到合适的行为;否则,应用程序就必须通过重载layoutSubviews方法来提供自己的实现。 se....
分类:
其他好文 时间:
2014-07-23 14:46:46
阅读次数:
149
#import @interface DPopoverView : UIView+ (void)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withContentView:(UIView *)cView;- (void)showPo...
分类:
其他好文 时间:
2014-07-23 12:42:36
阅读次数:
264
iOS中的动画有两种实现方式,一种是UIView来实现动画,另一种动画是通过CALayer来实现,下面介绍两种动画的简单实现:一、UIView动画的实现UIView使用Context来实现动画关键代码://参数1动画名称参数2要实现动画的对象上下文
[UIViewbeginAnimations:@"attribute"context:_sh..
分类:
移动开发 时间:
2014-07-23 00:17:28
阅读次数:
689
这一部分主要介绍了iOS的绘图、手势、协议、block、力学特效动画(包括重力、碰撞、吸附等)以及自动布局的内容。 一、绘图、手势 (1)调用一个自定义的UIView时,可以使用awakeFromNib方法做一些初始化工作。 (2)iOS中绘图需要了解的常用测量单位: CGFloat:浮点...
分类:
移动开发 时间:
2014-07-22 00:38:36
阅读次数:
240
继承与UIView,直接调用start和stop事件;@interface ActivityIndicatorView (){ UIImageView *_imageView; UILabel *_label;}@end@implementation ActivityIndicatorView-.....
分类:
移动开发 时间:
2014-07-22 00:06:37
阅读次数:
297
转发自:http://www.aichengxu.com/article/%CF%B5%CD%B3%D3%C5%BB%AF/16306_12.htmlIOS UIVIEW layer动画 总结,有需要的朋友可以参考下。这是我搜索的所有动画效果,感谢前辈在网上分享.//翻页效果动画 左边 [UI...
分类:
移动开发 时间:
2014-07-21 09:09:11
阅读次数:
335
http://gksanthoshbe.blogspot.com/2013/03/ios-interview-questions-and-answers.html1-How would you create your own custom view?By Subclassing the UIView...
分类:
移动开发 时间:
2014-07-19 22:25:30
阅读次数:
544
- (IBAction)changePassWord:(id)sender{ CGSize size = [[UIScreen mainScreen] bounds].size; //增加半透明层 bgView = [[UIView alloc]initWithFrame:self.view...
分类:
其他好文 时间:
2014-07-19 16:31:10
阅读次数:
227
近期想做一个跑马灯的效果,于是写出了如下的跑马灯效果的代码。。。但是调试发现,在iOS6下动画是可以执行的,但是在iOS7下动画并不执行,没有达到预期的效果。
[_scrollLabel sizeToFit];
CGRect frame = _scrollLabel.frame;
frame.origin.x = 320;
_scrollLabel.frame = fra...
分类:
移动开发 时间:
2014-07-18 11:18:16
阅读次数:
208
1. 放大缩小float value = 2.0;self.imageView.transform = CGAffineTransformMakeScale(value, value);2. 移动// 重新赋值按钮的中点orangeBtn.center = center;3. 旋转// 左旋转...
分类:
其他好文 时间:
2014-07-18 08:20:30
阅读次数:
135