2014年1月14日

我的常用宏-IOS

摘要: core data获取appDelegate#define GetAppDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate])获取core data 模版中NSManagedObjectContext#define GetAppDelegateContext GetAppDelegate.managedObjectContext判断是否3.5寸屏幕#define Screen3dot5 CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSize... 阅读全文

posted @ 2014-01-14 17:00 永远的冰蝴蝶 阅读(250) 评论(0) 推荐(0)

2013年11月28日

GLKit Effects常量参考手册

摘要: 本文翻译自苹果官方文https://developer.apple.com/library/IOs/documentation/GLkit/Reference/GLKEffectsConstants/Reference/reference.html概览 GLKit effects(effect本文译为样式)实现了对着色器的计算. 着色器需要程序提供顶点数据。GLKit提供的所有样式均有一系列一致的目录集合,当你的程序通过调用glEnableVertexAttribArray方法来激活一个顶点属性集合,或者通过调用glVertexAttribPointer方法指定一个顶点属性的指针, GLK.. 阅读全文

posted @ 2013-11-28 13:36 永远的冰蝴蝶 阅读(509) 评论(0) 推荐(0)

2013年11月3日

Core Data初体验-创建一个最简单的core data应用

摘要: 运行环境 Xcode5一.Core Data的栈结构在AppDelegate.h里有这样三个属性@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreC 阅读全文

posted @ 2013-11-03 22:30 永远的冰蝴蝶 阅读(311) 评论(0) 推荐(0)

2013年10月18日

NSNotificationCenter接收不到post出来的事件

摘要: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(SelectorName) name:Nameobject:nil]; [[NSNotificationCenterdefaultCenter] postNotificationName:Nameobject:idObject]; 成对使用一直没有出状况,直到一次在一个未显示但是存在的UIViewController中注册了一个观察者,但是当post了对应的NotificationName后,注册的观察者并没有调用注册时加入的Se... 阅读全文

posted @ 2013-10-18 18:00 永远的冰蝴蝶 阅读(1478) 评论(0) 推荐(0)

2013年10月12日

ios6上的app在ios7上运行后,UINavigationController里添加的UIViewController上移

摘要: ios7的UIViewController里新增了edgesForExtendedLayout方法,默认值为UIRectEdgeAll,将其设为UIRectEdgeNone即解决 阅读全文

posted @ 2013-10-12 13:25 永远的冰蝴蝶 阅读(256) 评论(0) 推荐(0)

xcode5+未能安装到模拟器

摘要: xcode从4.6升级到5,应用程序出现 未能安装到模拟器,删除模拟器里的app后,重启xcode解决问题 删除模拟器app的两种方法:1. 长按app图标进行删除2. Finder->前往文件夹->输入~/Library/Application Support/iPhone Simulator/ ,找到该app删除 阅读全文

posted @ 2013-10-12 12:54 永远的冰蝴蝶 阅读(189) 评论(0) 推荐(0)

导航