导入动态库:libsqlite.3.0.tbd

#import "FMDB.h"

NSString *doc = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];

NSString *contactPath = [doc stringByAppendingPathComponent:@"database/t_contact.sqlite"];

FMDatabase *db = [FMDatabase databaseWithPath:contactPath];

if ([db open]) NSLog(@"打开数据库成功!");

else NSLog(@"打开数据库失败!");

文件路径中间有子文件夹。

先创建子文件夹。                      

[[NSFileManager defaultManager] createDirectoryAtPath:[doc stringByAppendingPathComponent:@"database"] withIntermediateDirectories:NO attributes:nil error:nil];

    

---

 

HUD之沙漏效果

​https://github.com/xjh093/JHAlertView​