ios点击产生波纹效果by 伍雪颖- (void)viewDidLoad{ [super viewDidLoad]; RippleView = [[UIView alloc] initWithFrame:(CGRect){0,0,300,300}]; RippleView.back...
分类:
移动开发 时间:
2014-08-29 19:54:58
阅读次数:
205
第四章 内存管理NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init ]; [pool drain];事实上程序中可以有多个自动释放池。自动释放池其实并不包含实际的对象本身,仅仅是对释放的对 象的引用。通过向目前的自动释放池发送一条au...
分类:
移动开发 时间:
2014-08-29 18:13:08
阅读次数:
208
内存管理规则 获得途径临时对象拥有对象alloc/new/copy不再使用时释放对象在 dealloc 方法中释放对象任何其他方法不需要执行任何操作获得对象时保留,在 dealloc 方法中释放对象内存管理规则摘要: 1、释放对象,可以释放其所占的内存,规则是:不再使用创建或者保持的对象时,就释放它...
分类:
移动开发 时间:
2014-08-29 18:11:28
阅读次数:
290
// 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* 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
其实,alloc和release都是NSObject里面的类方法(前面是加号+的那种),所以可以直接用类名字来调用,如ASStudent alloc。...
分类:
其他好文 时间:
2014-08-28 18:13:45
阅读次数:
222
//rightBar button UIButton *rightButton = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 34, 34)]; [rightButton setImage:[UIImage imageNamed:@"shar.....
分类:
其他好文 时间:
2014-08-28 13:06:09
阅读次数:
211
unsigned units=NSMonthCalendarUnit|NSDayCalendarUnit|NSYearCalendarUnit|NSWeekdayCalendarUnit; NSCalendar *mycal=[[NSCalendar alloc]initWithCal...
分类:
移动开发 时间:
2014-08-27 16:17:27
阅读次数:
149
- (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