- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section { view.tintColor = [UIColor clearColor]; ...
分类:
其他好文 时间:
2017-06-06 14:26:21
阅读次数:
246
秒表要实现的功能描写叙述:下方灰色背景的view上有两个button-開始/停止button 和 计次button。点击開始button,中间的大时钟開始计时,这时点击计次button。右上角的小时钟会把此刻的瞬时时间记录下来。同一时候在以下的tableView上也会显示。点击停止button会把右 ...
分类:
其他好文 时间:
2017-06-04 12:47:56
阅读次数:
278
因为一个项目中有大量的UITableViewCell须要书写,样式几乎相同都是 文字介绍:显示内容 这种。自己又懒得写UITableViewCell类嫌不是必需;在方法tableView:cellForRowAtIndexPath中手写又繁琐。就封装变化写了一个UIView类。 项目:点击下载 构思 ...
分类:
移动开发 时间:
2017-06-03 17:25:08
阅读次数:
243
#import "ViewController.h" @interface ViewController ()<UITableViewDataSource,UITableViewDelegate,UIGestureRecognizerDelegate> @end @implementation Vi ...
分类:
其他好文 时间:
2017-06-01 10:38:47
阅读次数:
211
UIView的层介绍 subview在西安市到屏幕上时。是位于superview上层的。 同一个view的subview时依照增加的顺序显示相应层的。越晚增加的subview显示在越上层。反之也是如此。 用superview能够直接管理subview的层。 -(void)insertSubview: ...
分类:
其他好文 时间:
2017-05-31 14:31:27
阅读次数:
173
/** * 这个尽管非常easy,算是一个小技巧,可是碰到了就记录下来吧.积跬步,致千里嘛. */ - (void)scratchableLatex { for (int i=0; i<9; i++) { UIView *view = [[UIView alloc]initWithFrame:CGR ...
分类:
移动开发 时间:
2017-05-31 10:14:44
阅读次数:
138
点击要切屏时点用此方法获取图片 image 极为切屏图片 - (UIImage *)captureImageFromView:(UIView *)view { CGRect screenRect = [view bounds]; UIGraphicsBeginImageContext(screenR ...
分类:
移动开发 时间:
2017-05-26 13:20:46
阅读次数:
230
UIView的层介绍 subview在西安市到屏幕上时,是位于superview上层的。 同一个view的subview时依照增加的顺序显示相应层的。越晚增加的subview显示在越上层,反之也是如此。 用superview能够直接管理subview的层。 -(void)insertSubview: ...
分类:
其他好文 时间:
2017-05-25 22:01:54
阅读次数:
202
先上图: 这个UIView能够这样写: -(id)initWithFrame:(CGRect)frame backImage:(UIImage*)image msgStr:(NSString*)txt txtColor:(UIColor*)color{ self = [super initWithF ...
分类:
移动开发 时间:
2017-05-24 21:09:07
阅读次数:
227
创建一个UIView的子类,重写drawRect方法可以实现不规则形状的View,这里提供一个带箭头View的实现代码: ArrowView.h ArrowView.m 然后在ViewController中调用,查看结果 ViewController.m 结果截图: 控制台打印结果: 控制台打印的线 ...
分类:
移动开发 时间:
2017-05-24 12:49:38
阅读次数:
231