NSFileManager *manager = [[NSFileManager alloc]init]; if ([manager isDeletableFileAtPath:filePath]) { [manager removeItemAtPath:filePath error:nil...
分类:
其他好文 时间:
2014-06-25 22:56:17
阅读次数:
205
实例变量与方法一、实例变量的可见度二、方法oc中的方法分两种:类方法和实例方法类方法:只能类使用 eg:+ (id)alloc 注:类方法中不能使用实例变量实例方法:只能对象使用,eg:- (void)sayHi
分类:
移动开发 时间:
2014-06-25 20:43:54
阅读次数:
231
UISwitch大小总是改不了...找了一个简便方法.?mySwitch = [[UISwitch alloc] initWithFrame: CGRectMake( width - 55, height * .5 - 15, 100, 20)]; [mySwitch setOn: YES anim...
分类:
其他好文 时间:
2014-06-25 20:15:39
阅读次数:
403
iOS开发多线程篇—线程的状态一、简单介绍线程的创建:self.thread=[[NSThread alloc]initWithTarget:self selector:@selector(test) object:nil];说明:创建线程有多种方式,这里不做过多的介绍。线程的开启:[self.th...
分类:
移动开发 时间:
2014-06-25 11:55:02
阅读次数:
306
每一个iPhone程序都包含一个UIApplication对象,它管理整个程序的生命周期,从加载第一个显示界面开始,并且监听系统事件、程序事件调度整个程序的执行。
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int ret...
分类:
移动开发 时间:
2014-06-25 06:55:38
阅读次数:
268
在.m文件中使用对象方法:- (id)init{_name =@“zhangsan”;_age = 18;return self;}然后通过main方法中进行创建对象并初始化:例如:Person *p1 = [[Person alloc] init];类方法alloc是分配内存空间,对象方法init...
分类:
其他好文 时间:
2014-06-24 15:13:45
阅读次数:
170
1.创建和启动线程 一个NSThread对象就代表一条线程; 创建,启动线程NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil];[thread start];2.线程...
分类:
其他好文 时间:
2014-06-24 13:33:55
阅读次数:
167
1.线程的状态NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil];[thread start];2.控制线程状态2.1>启动线程 -(void)start; //进....
分类:
编程语言 时间:
2014-06-24 11:53:02
阅读次数:
233
1.NSThread创建方式(一个NSThread对象就代表一条线程)1.1>创建\启动线程(1)线程一启动,就会在thread中执行self的run方法NSTread *thread = [[NSThread alloc] initWithTarget:self selector:@selecto...
分类:
其他好文 时间:
2014-06-24 11:42:16
阅读次数:
224
public member function
std::vector::vector
C++98
C++11
default (1)
explicit vector (const allocator_type& alloc = allocator_type());
fill (2)
explicit vec...
分类:
其他好文 时间:
2014-06-22 07:02:06
阅读次数:
386