解决方案 »
- 新手提问:断点调试如何进入函数内部调试?
- 跪求SDL移植到IPhone上的方法
- 导航栏navigationcontroller的页面跳转
- swift网络请求
- 怎么在oc中用swift实现controller跳转?
- ad hoc 上架也要通过 https://itunesconnect.apple.com填写一大堆app的信息?
- 怎么去掉NavigationBar 底部的黑线
- tableview的编辑状态
- ios开发中webView要拦截的网站能不能在拦截之前获取到
- 各位大侠,ios webview中使用h5定位时弹出 “http://xxx.xxx.xx”想使用您当前位置,如何才能去掉url地址呢?
- Win平台下的C代码迁移MAC平台XCODE
- iOS开发的样式
NSString *documentPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *realPath = [documentPath stringByAppendingPathComponent:@"fanmeli.sqlite"];
// 程序里面的文件目录
NSString *sourcePath = [[NSBundle mainBundle] pathForResource:@"fanmeli" ofType:@"sqlite"];
NSFileManager *fileManager = [NSFileManager defaultManager];
// 判断拷贝路径
if (![fileManager fileExistsAtPath:realPath]) {
NSError *error;
if (![fileManager copyItemAtPath:sourcePath toPath:realPath error:&error]) {
NSLog(@"%@",[error localizedDescription]);
}
}
……
如果是资源类的文件,直接当资源文件处理就可以了。
如果文件在App运行时才由沙盒外传进来就麻烦一点,需要借助iCloud、iTunes、webserver等
这个路径就可以在你的代码中访问