摘要:
代码如下,在UITableViewDataSource中设置- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView{NSMutableArray *arr = [[[NSMutableArray alloc] initWithCapacity:0] autorelease];[arr addObject:@"{search}"];//等价于[arr addObject:UITableViewIndexSearch];return arr;}效果图:...http://www.cocoachin 阅读全文
摘要:
//检查数据库|| 复制数据库文件 NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *folderPath = [searchPaths objectAtIndex:0]; NSString *dbfilePath = [folderPath stringByAppendingPathComponent:DB_FILE_NAME]; if (![[NSFileManager defaultMan... 阅读全文
摘要:
//写入:NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);NSString *dataPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@”sqlite.sqlite”];NSData *image=UIImagePNGRepresentation([UIImage imageNamed:@"01_02.png"]);NSString *aaa=[[NSS 阅读全文
摘要:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);//多页面操作mydata.plist if (![[NSFileManager defaultManager] fileExistsAtPath:[[paths objectAtIndex:0] stringByAppendingPathComponent:@"mydata.plist"]]) { if ([[NSFileManager defaultManager] copyIt 阅读全文