SQLite on AppDelegate required?
Is it always required that SQLITE be declared on AppDelegate ? What if I want the SQL query to be used later in the views ? or I'm planning to switch to different DBs dyn开发者_如何学运维amically. Was looking on possibility of creating a separate new class to handle SQLITE (such as SQLiteManager) to manage all SQLite related operations.
Nope, its totally not necessary to declare your SQLite stuff in AppDelegate
unless you need it at the very start of the app.
I've got an app on the store which works with SQLite in the same manner you said, via a separate 'SQLiteManager' class which has all the SQLite declarations, DB logins, data handling, query building etc. And whenever I need DB access in my app, I simply import this class and make use of it.
精彩评论