toDoList-Sqllite-Swift
##Steps:
- Create a xcode project (single view application)
- select swift (uncheck the use core data)
- initialize pod into the project directory
- import the required sqlite library (pod)
- add a navigation View Controller(VC) (make it initial)
- add another VC for helping with the creation of TODO
- joins the views with seagues and name them
- drag a table and drop it in initial view (add a cell to the table and set its identifier)
- create three swift files (DBUtil.swift for database hadeling, toDo.swift for model which conforms nsobject, and detailVC.swift which conforms to View Controller)
- create model in toDo.swift and set getter and setter and error handling for empty data
- in DBUtil.swift create a DB, than create a connection for connecting to DB
- add creation, count, updation , deletion and access all mehtods
- add code in viewcontroller.swift to handle tabel and cell for population and deletion
- add code in detailVC.shift to handle creation and updation and timestamping
##How Does Code Work
- when app runs a database(db) is created if it dosen't exist else the existing db is connected
- app checks for data in table(dB) if data is present tableview(view) is populated
- for creation app takes input from user, inserts it into table(db) with current time stamp
- for updation app takes changes, updates the existing table(db) against certain record adds current time stamp to updated at
- for deletion app takes the id and delete it from table and updates the model.