how to make a Questionnaire iPhone app with sqlite - iphone

I want to make an iPhone app just like a questionnaire/Quize, and want to store all questions in sqlite database , i need to have One question that can be a label and 4 radio buttons for answers, user will select the option and will go for the next question, questions and answers will be saved in sqlite and at the end user will come to know how many he made correct or wrong choices.
Please suggest me any tutorial or anything that can be help full for me,please guise i will be grateful to u for this kindness in advance.

Just make a database with a table with columns like so : id, question, answer1,answer2,answer3,answer4,correct answer, did answer correct;
If you don't know SQL just use a wrapper like FMDB
After that just us use the built in function to get from database the question with a certain id (i.e. question number) and pass that to your question-asking class . When the user presses on an answer, check if it's correct and modify "did answer correct" columns.

Break your project into set of questions:
1. How to create GUI in iPhone?
2. How to connect to database in iPhone?
3. How to create label, radio buttons in iPhone?
4. How to submit form in iPhone?
Etc.
Then search the web for each of these. Perform these examples individually, test them and combine them.
Voila you've got a brand new questionnaire application :)!!!

Related

Component like Timeli app in IOS

I am posting the question again with more clarity.
I am trying to develop a component similar to the UI for timeline component in "Timeli" app.Ia m not sure how to start or which iOS controls to use for this .The requirement is to show the years in a horizontal table view.Pinching on the tableview should expand that particular cell and at some particular point the cell should break into the different months in that year.If the user further try to expand a particular cell by pinching then that cell should break into the different days .Reverse should also work.It would be great if anyone can help me with some tips or suggestions to star developing this.
I don't know that particular app, but I can give some general advice: browse through the open source components at Cocoa Controls; find one that is similar to what you want to create; download the source code and study it.
Even if you can't find exactly what you want, you might learn some techniques that will help you figure out how to build the control you want to build.
If you want more specific help, you're going to have to make an attempt, and then ask a specific question where you explain what you're doing and what's not working. Generic "how do I build this?" questions don't usually work too well here, because nobody knows where you are starting from.

building a quiz game in c#

Forgive me, as I am new to c sharp, and programming in general. I am trying to make a quiz game, and am hoping that someone might point me in the right direction.
So here's the program would do...
When the user starts the program, he/she has two options:
to create a category, such as history, family, football,...and so on.
To Play the Game, at which point the user would select a previously created category from which the questions would arise.
So if I am the user, and I click on "Create a new category", I am taken to a screen where I can do just that. I enter "Family". And now I have the option of creating subcategories of family. For instance the subcategories might be my family members, so I can have Bobby, Mike, Suzy, mom, and dad.
Once I have created these subcategories, I can click on any one of them, and enter questions about that specific one. If I click on dad, I make a list of questions like, "What year was dad born?", what is Dad's favorite food?", " Where does dad work?", etc.
And for each of these questions, I enter the answer.
So after making the category and subcategories I go back to the main page and click "play Game", and then choose the Family" category. When the game starts, it will pick randomly from the subcategories, and questions about them randomly.
For instance, the program picks Dad, displays "Dad" in a large text box. Under the large text box is the question that the program has selected from the subcategory "Dad". If it asks, "What is dad's favorite food", then the user must type in, "Beef Stew". after answering, and being right or wrong, the program then randomly selects another subcategory, and so forth, and so on
I am using visual studio for this project, and I know how to set up the user interface, but I seem to be confusing myself concerning the user data. Do I need to store the user input in a database? If so what process do I use to recall the information so the program access it and implement it in the game? Do I store it as lists, arrays, collections? If so, what do I need to do to re-implement those lists, arrays, or collections back into the programs code?
I'm really hoping to get an explanation, in words, of what steps I need to take to create this program. Like I said, I'm a newb. So if you can just give me a list of steps, I'll gather the relevant instructions for those steps from my c# books. Any help is much appreciated. Thanks in advance
You will have to store the questions somewhere (except in memorry) if you still want to have them wenn you restart the program.
Create a Question-Class wich stores the question and the possible answers, ...
When the user creates a new question you create a new Object from that class with the information that the user typed in. Then you will have to store this question somewhere. The best solution would propably be a database.
Create a database in wich you insert all the questions the user created.
When the user then wants to play the quiz you query all the questions from the seleced category and store them in memory(use something like a DataTable).
You can then choose a random question out of the table.
And that should be it.
Google the following topics for more information: database, sql, C# database, DataTable, ...

Using CoreData to save data across Views and sessions

I am new to IOS and coreData Framework..from past 2 days m reading tutors regarding coredata..I understood few concepts..but i am confused..can you all please suggest me good tutorials regarding coredata.
So my second problem..I am building a application..where my first view has a text field and a search button..and an empty table..so when the user enters a search query and hit the search button..it opens a another view which gives him a list of values in a table and again when the user cliks on a specific cell he is agian taken to page which contains some values..so on this page ,I want to have a button name (xyz) which when cliked..will save that particular value in the table which is present in the first view..and similarly the process will conitnue..
So i want to know..whether coredata is necessary for my problem or any diffrent menthods are available......
Please reply..m waiting for your respones..
Regards
RRK
Core Data manage very well sqlite database.
You can learn on the apple developer website :
http://developer.apple.com/library/ios/#documentation/DataManagement/Devpedia-CoreData/coreDataOverview.html
And there is a quite good tutorial here :
http://developer.apple.com/library/ios/#documentation/DataManagement/Conceptual/iPhoneCoreData01/Introduction/Introduction.html
I think core data is a very suitable solution for your problem.

wiki iphone project

I'm currently working on an iPhone project where i want to present to the user spesific terms from wikipedia. I'm facing tow difficulties right now:
1. I want the specific content to work offline.
2. I want to show the relevant pictures as well.
I need to find the most efficient way to do it, can someone advise ?
You could get the content online and cache them in the app DB. If necessary you could prepolutate the db directly in you app. That way some terms would already be available.

Add new field in existing built in Application of iPhone

Hope you all are fine and are in your best of moods.
I herewith one doubt to ask you, kindly help me by giving its solution.
I need to add one custom field in existing built in Contact Application of iPhone.
I mean i need to allow user to set different icon or Logo for different contact.
so i need to add one field namely icon or Logo in existing application.
But I don't know how to do this, weather it is possible or not or is there any alternate solution for that or not???
kindly post your Answers.
Thanks in Advance.
You cannot add fields to the built in Address Book datastore. You could perhaps achieve your goals by one of two solutions:
make a copy of the data and add your data to that. You will hit sync problems
Use some property (perhaps ABPropertyID) of the AB information to key a local database referencing your icons.
I'm assuming what you actually want to do is add an icon to the address book app - there is certainly no way to do that.