导航、Tabbar、tableview配合使用时,tableview会出现错位的情况,特别是除tabbar的第一个选项的tableview,
解决方法非常简单,如下:
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.edgesForExtendedLayout =...
分类:
其他好文 时间:
2014-11-09 22:18:05
阅读次数:
173
1. 进程和线程之间有什么不同?一个进程是一个独立(self contained)的运行环境,它可以被看作一个程序或者一个应用。而线程是在进程中执行的一个任务。Java运行环境是一个包含了不同的类和程序的单一进程。线程可以被称为轻量级进程。线程需要较少的资源来创建和驻留在进程中,并且可以共享进程中的...
分类:
编程语言 时间:
2014-11-09 20:45:43
阅读次数:
196
今天读了LPTHW的第40章以后豁然开朗,原来一直愚钝,不太理解类的定义和使用,还有就是不太理解关于self的定义。class MyStuff(object): def __init__(self): self.tangerine = "And now a thousand years be...
分类:
编程语言 时间:
2014-11-08 23:27:08
阅读次数:
300
沙箱模式常见于YUI3 core,它是一种采用同一构造器(Constructor)生成彼此独立且互不干扰(self-contained)的实例对象,而从避免污染全局对象的方法。命名空间JavaScript本身中没有提供命名空间机制,所以为了避免不同函数、对象以及变量名对全局空间的污染,通常的做法是为...
分类:
数据库 时间:
2014-11-08 22:09:36
阅读次数:
470
创建 Android 上使用的自签名证书(Creating self-signed certificates for use on Android)...
分类:
移动开发 时间:
2014-11-08 19:42:42
阅读次数:
486
第一种方法:ViewControllerB *vcB = [self.storyboard instantiateViewControllerWithIdentifier:@"Name of View Controller B"];[vcB setModalTransitionStyle:UIMo....
分类:
其他好文 时间:
2014-11-08 10:28:32
阅读次数:
316
1 def __init__(self, *args, **kwargs):2 kwargs['blank'] = True3 if 'default' not in kwargs and not kwargs.get('null'):4 ...
分类:
其他好文 时间:
2014-11-08 07:05:23
阅读次数:
209
- (instancetype) initWithDict:(NSDictionary *)dict{ if (self = [super init]) { self.answer = dict[@"answer"]; self.title = dict[@"title"]; ...
分类:
其他好文 时间:
2014-11-08 00:42:40
阅读次数:
207
1、block的功能是实现代码的回调,简单高效[UIView animateWithDuration:1.0 animations:^{ //需要执行的代码 self.cover.alpha = 0.0; self.imageBtn.frame = CGRectMake(85, 8...
分类:
其他好文 时间:
2014-11-08 00:42:15
阅读次数:
147
classStudent(object):#定义一个类,括号内容表示继承自那个类,不知道继承自哪个类就用object类#
def__init__(self,name,score):#__init__是一个初始化的方法,定义的参数,属性可以在全局中调用,这里的name,score是一个全局参数#
self.name=name
self.score=score
self.tt=..
分类:
编程语言 时间:
2014-11-07 19:17:17
阅读次数:
263