Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. class ViewController: UIViewController {
  2. var db :sqliteConnect?
  3.  
  4. override func viewDidLoad() {
  5. super.viewDidLoad()
  6. // Do any additional setup after loading the view, typically from a nib.
  7. // 資料庫檔案的路徑
  8. let urls = FileManager.default.urls(
  9. for: .documentDirectory, in: .userDomainMask)
  10. let sqlitePath = urls[urls.count-1].absoluteString + "sqlite3.db"
  11.  
  12. // 印出儲存檔案的位置
  13. print(sqlitePath)
  14.  
  15. // SQLite 資料庫
  16. db = SQLiteConnect(path: sqlitePath)
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement