开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜