共 5 篇文章 |
|
4 NSEntityDescription * entity = [NSEntityDescription entityForName:@"Person" inManagedObjectContext:self.managedObjectContext];8 NSArray * persons = [self.managedObjectContext executeFetchRequest:fetchRequest error:&requestError]; 阅62 转0 评0 公众公开 15-08-03 08:32 |
- (NSString *)stringByAppendingPathExtension:(NSString *)str;//例:从本地文件沙盒中取图片并转换为NSDataNSString *path = [[NSBundle mainBundle] bundlePath];NSString *name = [NSString stringWithFormat:@"ceshi.png"];NSString *finalPath = [path stringByAppendingPathComponent:name];NSData *imageData = [NSData dat... 阅39 转0 评0 公众公开 15-08-02 13:14 |
ios 开发中建立索引并查询以下我们就建立数据库、建立资料表及索引、新增资料、查询资料、更改资料、移除资料、 sqlite3 命令列选项等几个项目做简单的介绍。建立资料表 假设我们要建一个名叫film的资料表,只要键入以下指令就可以了: create table film(title, length, year, starring); 这样我们就建立了一个名叫film的资料表,里面有nam... 阅580 转0 评0 公众公开 15-08-02 11:35 |
使用SQLCipher加密SQLite数据库。SQLCipher是一个开源的SQLite加密扩展,支持对db文件进行256位的AES加密。1、获取SQLite加密模块(SQLCipher)执行pod install之后会自动获取SQLCipher,其实SQLCipher只有两个文件sqlite3.h和sqlite3.m。拷贝sqlite3.h/sqlite3.m文件到项目中,如果使用CocoaPods方式获取SQLCipher的话,这一步骤就不需要了。通... 阅2224 转1 评0 公众公开 15-08-01 20:31 |