首先两个方法都是异步执行。layoutSubviews方便数据计算,drawRect方便视图重绘。
layoutSubviews在以下情况下会被调用:
1、init初始化不会触发layoutSubviews。
2、addSubview会触发layoutSubviews。
3、设置view的Frame会触发layoutSubviews,当然前提是frame的值设置前后发生了变化。
4、滚动...
分类:
其他好文 时间:
2014-08-22 16:27:59
阅读次数:
138
CALayer属于Core Animation部分的内容
1. UIView是iOS系统中界面元素的基础,所有的界面元素都是继承自它。它本身完全是由CoreAnimation来实现的。它真正的绘图部分,是由一个CALayer类来管理。UIView本身更像是一个CALayer的管理器,访问它的跟绘图和跟坐标有关的属性,例如frame,bounds等,实际上内部都是在访问它所包含的CALayer...
分类:
其他好文 时间:
2014-08-22 16:24:29
阅读次数:
201
UITableview中可以通过1 UITableView *_tableView;2 _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.fra...
分类:
移动开发 时间:
2014-08-22 16:11:18
阅读次数:
225
IWebDriver.SwitchTo().Frame(IWebElement frame)如果一个页面是一个html元素, 只有一个head, 一个body, 那么使用IWebDriver.FindElement()查找页面中的任何一个元素都没有问题。但是,由于页面中 frames = drive...
Failed to read the ‘contentDocument‘ property from ‘HTMLIFrameElement‘: Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match.? 不想...
分类:
其他好文 时间:
2014-08-21 17:26:44
阅读次数:
164
IDR_FRAME 中有这样一个字符串,它由7部分构成,相邻子串之间以‘\n’分隔
窗口标题\n
文档名字\n
SB\n
Code Files(*.cpp)\n
.cpp\n
mfcArchive.Document\n
mfcArchive.Document
下面一个一个解释。
1 窗口的标题
2 表示文档名称
3 文档模板的名称,如果一个APP中有多个可供选择的文档...
分类:
其他好文 时间:
2014-08-21 04:12:03
阅读次数:
182
1 this.dynamicPanel = new Ext.Panel({2 region: 'center',3 frame: false,4 border: false,5 layout:'fit',...
分类:
Web程序 时间:
2014-08-20 16:02:43
阅读次数:
172
实现的原理:利用了自动布局和形变核心代码块:@implementation JHMainView{ UILabel *label1,*label2,*label3,*label4; UIButton *btn;}- (id)initWithFrame:(CGRect)frame{ self =...
分类:
移动开发 时间:
2014-08-20 13:53:02
阅读次数:
237
在xcode5.1上写的代码,ios7运行良好,在IOS6模拟器,发现cell全白,折腾半天,发现原来有些区别,供后来遇到这个问题的查看
// cell.backgroundColor = aColor; ios7
//ios6
cell.backgroundView = [[UIView alloc] initWithFrame:cell.frame];
...
分类:
移动开发 时间:
2014-08-20 12:35:32
阅读次数:
276
可采用的库为AWT,即abstract windowtoolkit
当前第二代GUI开发库为Swing,具有更加完善的控件支持。
Component与Container是AWT中最重要的两个类,其中Component是所有控件类的父类,而Container是Window、Frame、Panel等容器类的父类。
布局坐标系,水平方向为x轴,竖直方向为y轴。
布局管理器...
分类:
编程语言 时间:
2014-08-19 22:30:05
阅读次数:
283