学习笔记

来源:互联网 发布:淘宝怎么优化关键词 编辑:程序博客网 时间:2024/06/06 01:10

NSBundle mainBundle

Returns the NSBundle object that corresponds to the directory where the current application executable is located.

返回NSBundle对象对应于当前应用程序可执行文件所在的目录。


实例对象的创建 有两种 分为alloc创建和 类方法创建

区别 是 内存管理方式不一样

alloc 需要进行release、类方法 创建的对象已经经过autorelease。


UIViewAnimationOptions option = isLeft ?UIViewAnimationOptionTransitionFlipFromLeft :UIViewAnimationOptionTransitionFlipFromRight;

    [UIViewtransitionWithView:viewduration:0.3options:optionanimations:nilcompletion:nil];

翻转动画


本地json数据解析

NSString *filePath = [[NSBundle mainBundle]pathForResource:@"us_box.json" ofType:nil];

//    NSData *data = [NSData dataWithContentsOfFile:filePath];

//    NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];


0 0