0

http://www.techotopia.com/index.php/An_Example_SQLite_based_iOS_4_iPhone_Application_%28Xcode_4%29

I have found this sqlite tutorial on google and it worked great for my requirement. In this tutorial both adding and retrieving data are done on the same viewcontroller. but i want that 'save' method in the tutorial in one viewcontroller and 'find' method in the other.

And also someone tell me whether this tutorial is an effective way to save data or not.because this is the easiest tutorial I found so far.

2 Answers 2

1

You might also create a new class ,or use inheritance (upper class) call it for example "SqliteClass" that have both the 'Save' and 'Find' method

then you can use any method in SqliteClass from any other class ,,
in case you don't want to use inheritance make sure that the methods in SqliteClass are "class" methods the one begins with "+" not"-" I used both ways and they work just fine ..

Hope that helps :)

Sign up to request clarification or add additional context in comments.

Comments

0

Yes, you can to that. you can have n number of view and can save data from any view controller.

check this tutorial.

http://www.icodeblog.com/2008/08/19/iphone-programming-tutorial-creating-a-todo-list-using-sqlite-part-1/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.