//将像素point由point所在视图转换到目标视图view中,返回在目标视图view中的像素值- (CGPoint)convertPoint:(CGPoint)point toView:(UIView *)view;//将像素point从view中转换到当前视图中,返回在当前视图中的像素值- (...
分类:
其他好文 时间:
2016-01-23 21:08:23
阅读次数:
131
1 #import 2 3 @interface NJLineView : UIView 4 @end 5 6 7 #import "NJLineView.h" 8 9 @implementation NJLineView10 11 // 当自定义view第一次显示出来的时候就会调用dr...
分类:
移动开发 时间:
2016-01-22 17:01:44
阅读次数:
135
1 @interface NJTextImage : UIView 2 @end 3 4 5 @implementation NJTextImage 6 7 - (void)drawRect:(CGRect)rect 8 { 9 // [self test];10 // ...
分类:
移动开发 时间:
2016-01-22 16:58:41
阅读次数:
144
这里只贴主要代码#import "ViewController.h"@interface ViewController (){ UIView * _loadView;}- (void)viewDidLoad { _loadView = [[UIView alloc] initWithFr...
分类:
其他好文 时间:
2016-01-22 13:45:00
阅读次数:
119
- (void) showRefreshAnimation { [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ self.refreshI...
分类:
其他好文 时间:
2016-01-22 13:28:57
阅读次数:
128
UIView中的这三个属性用的比较多,尤其是Alpha和Opaque之间有的时候不是很好分别,稍微整理下:Alpha(不透明度)alpha是不透明度,属性为浮点类型的值,取值范围从0到1.0,表示从完全透明到完全不透明,其特性有当前UIView的alpha值会被其所有subview继承。alpha值...
分类:
移动开发 时间:
2016-01-22 08:10:26
阅读次数:
171
app中很多地方用到了单实线,有的是横着的,有的是竖着的,偷懒的时候直接用UIView,设置背景色就搞定了。。。不过,心里很是不安&不爽。下边就上代码了。 SingleLineView.h 1 #import 2 3 // 单实线方向 4 typedef enum { 5 // 横...
分类:
其他好文 时间:
2016-01-21 11:56:46
阅读次数:
142
//// ViewController.m// 飞舞的UIView//// Created by 大欢 on 16/1/18.// Copyright © 2016年 bjsxt. All rights reserved.///************************************...
分类:
移动开发 时间:
2016-01-20 22:13:11
阅读次数:
188
UIView 不像 UIButton 加了点击事件就会有点击效果,体验要差不少,这里分别通过自定义和扩展来实现类似 UIButton 的效果。
分类:
编程语言 时间:
2016-01-20 12:54:49
阅读次数:
524
之前介绍的是UIView 的动画(http://www.cnblogs.com/loying/p/5122253.html),这次介绍的是CAAnimation的动画。在xcode中打开CAAnimation.h ,可以看到以下几个类:CAAnimation、CAPropertyAnimationC...
分类:
其他好文 时间:
2016-01-19 23:23:38
阅读次数:
169