I have an app finished. When I wrote the app I didn't intend for it to become so .png overloaded. It is a quiz app and I have it working great, the problem is in the resource files (questions, answers, wrong answers,etc.) which are beginning to bog down launching the app with so many files. I have read and viewed tutorials but nothing seems to fit this type of situation - believe me I have tried everything. I have written the app programmatically and would like to use Core Data to store the files into a .plist or cxdata, but so far nothing seems to work. I'm sure it's something very simple and I just find myself stumped - writers block I guess? Is it possible to create a static UIView background and insert the text as needed per question/answer and still have the integer values for random questions, switching answers, etc. operate correctly? Here is an example of what I would like to manage better. Any help is greatly appreciated!!
Why do you need to load everything at once? I would load only 3 questions at a time, the previous, current and next question. Every time you show the next question, set the "current" to previous, next to current and load the next question (assynchronously while the user is reading/answering the current one).
It will be fast to load and will not hog resources.
Why do you need to load everything at once? I would load only 3 questions at a time, the previous, current and next question. Every time you show the next question, set the "current" to previous, next to current and load the next question (assynchronously while the user is reading/answering the current one).
It will be fast to load and will not hog resources.
Thank you so much!!! That makes perfect sense and seems like a rather easy fix!! Obviously, I am not very familiar with Core Data so that would have been another project in itself. I normally deal with Audio/Video streaming (kinda my niche). I wanted to experiment with something "out of the box", and for me and this has been a great learning experience.
I would still like to learn more about Core Data (not for this project). Do you have any suggestions on some good tutorials that use anything besides tables...lol
The place that really got me started with Core Data was this blog from the authors of the "iPhone in Action" book (a great book, if you can, definetely buy it)
They have a series of articles on Core Data that are so much more clear and "to the point" than the Apple documentation. iPhone in Action: Core Data
You also probably want to use imageWithContentsOfFile: rather than imageNamed: , because imageNamed: caches images, which would increase your memory consumption.
Oh, and if you do get that book, Manning is actually running a discount code on the second edition of it ("iPhone and iPad in Action") right now (thru June 17). It's a work in progress, not complete, but if you buy the PDF you get updates along the way until it's complete, AND you get the full PDF of the first edition to tide you over until then. If you enter discount code "wwdc45" at checkout, you'll get it for 45% off, too.
Why do you need to load everything at once? I would load only 3 questions at a time, the previous, current and next question. Every time you show the next question, set the "current" to previous, next to current and load the next question (assynchronously while the user is reading/answering the current one).
It will be fast to load and will not hog resources.