码迷,mamicode.com
首页 >  
搜索关键字:alloc    ( 3259个结果
原来是 临时的那张图片没有删除,code 516
NSFileManager *manager = [[NSFileManager alloc]init]; if ([manager isDeletableFileAtPath:filePath]) { [manager removeItemAtPath:filePath error:nil...
分类:其他好文   时间:2014-06-25 22:56:17    阅读次数:205
iOS学习笔记---oc语言第二天
实例变量与方法一、实例变量的可见度二、方法oc中的方法分两种:类方法和实例方法类方法:只能类使用 eg:+ (id)alloc 注:类方法中不能使用实例变量实例方法:只能对象使用,eg:- (void)sayHi
分类:移动开发   时间:2014-06-25 20:43:54    阅读次数:231
更改UISwitch大小
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开发多线程篇—线程的状态
iOS开发多线程篇—线程的状态一、简单介绍线程的创建:self.thread=[[NSThread alloc]initWithTarget:self selector:@selector(test) object:nil];说明:创建线程有多种方式,这里不做过多的介绍。线程的开启:[self.th...
分类:移动开发   时间:2014-06-25 11:55:02    阅读次数:306
iOS_应用程序的生命周期
每一个iPhone程序都包含一个UIApplication对象,它管理整个程序的生命周期,从加载第一个显示界面开始,并且监听系统事件、程序事件调度整个程序的执行。 int main(int argc, char *argv[]) {       NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];       int ret...
分类:移动开发   时间:2014-06-25 06:55:38    阅读次数:268
oc中对象的初始化
在.m文件中使用对象方法:- (id)init{_name =@“zhangsan”;_age = 18;return self;}然后通过main方法中进行创建对象并初始化:例如:Person *p1 = [[Person alloc] init];类方法alloc是分配内存空间,对象方法init...
分类:其他好文   时间:2014-06-24 15:13:45    阅读次数:170
NSThread基础使用
1.创建和启动线程 一个NSThread对象就代表一条线程; 创建,启动线程NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil];[thread start];2.线程...
分类:其他好文   时间:2014-06-24 13:33:55    阅读次数:167
OC中线程的状态相关
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
NSThread的一些细节
1.NSThread创建方式(一个NSThread对象就代表一条线程)1.1>创建\启动线程(1)线程一启动,就会在thread中执行self的run方法NSTread *thread = [[NSThread alloc] initWithTarget:self selector:@selecto...
分类:其他好文   时间:2014-06-24 11:42:16    阅读次数:224
STL vector的构造函数和析构函数(2)
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!