码迷,mamicode.com
首页 >  
搜索关键字:alloc    ( 3259个结果
ios点击产生波纹效果
ios点击产生波纹效果by 伍雪颖- (void)viewDidLoad{ [super viewDidLoad]; RippleView = [[UIView alloc] initWithFrame:(CGRect){0,0,300,300}]; RippleView.back...
分类:移动开发   时间:2014-08-29 19:54:58    阅读次数:205
ios学习总结(二)
第四章 内存管理NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init ]; [pool drain];事实上程序中可以有多个自动释放池。自动释放池其实并不包含实际的对象本身,仅仅是对释放的对 象的引用。通过向目前的自动释放池发送一条au...
分类:移动开发   时间:2014-08-29 18:13:08    阅读次数:208
ios学习总结(三)
内存管理规则 获得途径临时对象拥有对象alloc/new/copy不再使用时释放对象在 dealloc 方法中释放对象任何其他方法不需要执行任何操作获得对象时保留,在 dealloc 方法中释放对象内存管理规则摘要: 1、释放对象,可以释放其所占的内存,规则是:不再使用创建或者保持的对象时,就释放它...
分类:移动开发   时间:2014-08-29 18:11:28    阅读次数:290
IOS--UIStepper的使用方法
// UIStepper的常用方法     UIStepper *oneStepper = [[UIStepper alloc] init];     oneStepper.frame = CGRectMake(20, 20, 20, 20);     oneStepper.backgroundColor = [UIColor blueColor]; // 设置背景色    ...
分类:移动开发   时间:2014-08-29 11:08:27    阅读次数:223
UISwitch开关控件
一、创建   UISwitch* mySwitch = [[ UISwitch alloc]initWithFrame:CGRectMake(200.0,10.0,0.0,0.0)]; 大小是0.0×0.0,系统会自动帮你决定最佳的尺寸,你自己写的尺寸会被忽略掉,你只要定义好相对父视图的位置就好了。默认尺寸为79 * 27。 二、显示控件 [ parrentView addSub...
分类:其他好文   时间:2014-08-29 11:08:17    阅读次数:175
【OC学习-5】OC里面怎么实例化一个对象?以及什么是消息传递?
其实,alloc和release都是NSObject里面的类方法(前面是加号+的那种),所以可以直接用类名字来调用,如ASStudent alloc。...
分类:其他好文   时间:2014-08-28 18:13:45    阅读次数:222
RightBarButon
//rightBar button UIButton *rightButton = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 34, 34)]; [rightButton setImage:[UIImage imageNamed:@"shar.....
分类:其他好文   时间:2014-08-28 13:06:09    阅读次数:211
IOS 计算本周的起至日期
unsigned units=NSMonthCalendarUnit|NSDayCalendarUnit|NSYearCalendarUnit|NSWeekdayCalendarUnit; NSCalendar *mycal=[[NSCalendar alloc]initWithCal...
分类:移动开发   时间:2014-08-27 16:17:27    阅读次数:149
scrollview里面多张图片,每张都能放大缩小
- (void)viewDidLoad {     [super viewDidLoad]; self.view.backgroundColor = [UIColor whiteColor];          UITapGestureRecognizer *doubleTap =[[UITapGestureRecognizer alloc] initWithTarget:self ac...
分类:其他好文   时间:2014-08-27 13:09:17    阅读次数:153
时间差计算
//是不是过了指定的天数- (BOOL) isAfterDays:(int) days { NSDate * sendDate = [NSDate date]; NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init...
分类:其他好文   时间:2014-08-26 19:39:28    阅读次数:164
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!