setTimeout 比 setInterval 性能更好//
取代setIntervalsetTimeout(function self () { // code goes here setTimeout(self,
interval);}, interval);对异步执行的大...
分类:
编程语言 时间:
2014-06-16 07:48:21
阅读次数:
307
//点击其他地方,键盘收起- (void)touchesEnded:(NSSet *)touches
withEvent:(UIEvent *)event{ [super touchesEnded:touches withEvent:event];
[self.viewendEditing:YE.....
分类:
其他好文 时间:
2014-06-16 06:58:58
阅读次数:
163
【Objects & Class】1、定义一个类。
上述代码中,numberOfSides是实例变量,simpleDescription也是实例方法。2、创建实例,使用实例。
3、init是构造函数,deinit是析构函数: 上图代码中使用self来引用成员变量是为了与局部变量name...
分类:
其他好文 时间:
2014-06-16 00:52:51
阅读次数:
171
熟悉css的都晓得这个,16进制的 如:#666666http://blog.sina.com.cn/s/blog_5816f6a101019imm.html这个是付值的,查找16进制的颜色对照表,self.view.backgroundColor = [selfcolorWithHexString...
分类:
移动开发 时间:
2014-06-15 21:35:07
阅读次数:
245
首先 下载源代码倒入runloop文件夹下的 四个文件即可AsyncSocket *socket=[[AsyncSocketalloc]initWithDelegate:self];NSError *error;[socket connectToHost:honPort:pwithTimeout:-...
分类:
其他好文 时间:
2014-06-15 00:58:09
阅读次数:
172
源码如下:#!/usr/bin/env pythonclass Bird(): def __init__(self): self.hungry = True def eat(self): if self.hung...
分类:
编程语言 时间:
2014-06-14 18:23:05
阅读次数:
242
You are self-motivated.As a small business owner,you won't hava a boss to tell you when to get to work.If that's a problem,keep your day job.
You can work with number.You will spend a fair amount of time keeping track of money expenses,revenues,taxs...
分类:
其他好文 时间:
2014-06-14 12:10:26
阅读次数:
253
Self_hosting自托管宿主.过程:手动创建Host实例,把服务端点添加到Host实例上,把服务接口与Host关联.一个Host只能指定一个服务类型,但是可以添加多个服务端点,也可以打开多个Host.其中,Typeof(..)就是配置中的.在通常的企业应用中,我们很少会采用自宿主方式托管服务,...
分类:
其他好文 时间:
2014-06-13 07:08:14
阅读次数:
374
1.方法一:被隐藏的指令是recursiveDescription,你可以简单地用它对view进行检查,在view中调用recursiveDescription来打印它的继承关系。由于是私有方法,键入时不会有任何提示,注意不要输错。即在debug区域。输入
po [self.view recursi...
分类:
其他好文 时间:
2014-06-13 06:58:45
阅读次数:
216
- (CGFloat)tableView:(UITableView *)tableView
heightForRowAtIndexPath:(NSIndexPath *)indexPath {// 列寬CGFloat contentWidth =
self.tableView.frame.size....
分类:
其他好文 时间:
2014-06-12 23:17:40
阅读次数:
358