#import "WebViewController.h" @interface WebViewController ()<UIWebViewDelegate> @end @implementation WebViewController - (id)initWithNibName:(NSStrin ...
分类:
Web程序 时间:
2016-11-14 12:34:15
阅读次数:
177
1.设置view圆角 2.设置view阴影 通过上面的方式设置阴影,必须把clipsToBounds关闭. 3.同时设置view的圆角和阴影 如果上面的方法一起用,把masksToBounds开了,阴影无法显示,关了的话其上的View又会遮住圆角。解决的方式只能是再加一层layer。 ...
分类:
其他好文 时间:
2016-11-12 19:07:18
阅读次数:
211
DJStatusCellFrame.m DJStatusCell.m 最终效果: ...
分类:
其他好文 时间:
2016-11-10 01:30:16
阅读次数:
186
+ (UIImage *)imageWithCaputureView:(UIView *)view { // 开启位图上下文 UIGraphicsBeginImageContextWithOptions(view.bounds.size, NO, 0); // 获取上下文 CGContextRef ...
分类:
移动开发 时间:
2016-11-05 12:17:38
阅读次数:
142
1.根据字符串的长度确定Button的长度(button的高度给定) let hight:CGFloat = 30.0 let size1 = CGSize(width: getLabWidth(labelStr: "我的升级换代卡号多少", font: UIFont.systemFont(ofSi ...
分类:
编程语言 时间:
2016-11-04 19:46:02
阅读次数:
250
let vc = ViewController() let navc = UINavigationController(rootViewController: vc) window = UIWindow(frame: UIScreen.mainScreen().bounds) window?.bac ...
分类:
移动开发 时间:
2016-11-04 16:57:19
阅读次数:
480
一、 frame、bounds和center的区分 frame:由左边原点和矩形面积组成,其中原点代表其在父视图中的起点位置。 bounds:就是原点始终为(0,0)的frame。 center:本身矩形的中心点,加上原点的偏移。 1. 如下图所示,假设白色底层为View1,照片为视图View2,则 ...
分类:
其他好文 时间:
2016-10-29 01:16:21
阅读次数:
173
1、分类 (1)可控式异常:可预知的错误,在程序表一时对程序中可能存在的错误进行处理,给出具体的错误信息。 例:IOException、SQLException、ClassNotFoundException、NoSuchFieldException、NoSuchMethodException (2) ...
分类:
其他好文 时间:
2016-10-26 22:30:21
阅读次数:
242
Bounds是AABB包围盒的数据表示,AABB包围盒是包含对象,且边平行于坐标轴的最小六面体,如下图所示: 注意标注的Bounds的主要属性 而我们获得Bounds的主要途径有三种: Render.bounds Collider.bounds(Collider2D.bounds类似,就不赘述) M ...
分类:
其他好文 时间:
2016-10-22 14:54:23
阅读次数:
177