Best way to display a "High Scores" Results - iphone

First, I would to thank everyone for all the help they provide via this website. It has gotten me to the point of almost being able to release my first iPhone app!
Okay, so the last part I have is this: I have a game that allows users to save their high scores. I update a plist file which contains the users Name, Level, and score.
Now I want to create a screen that will display the top 20 high scores. What would be the best way to do this? At first I thought possibly creating an HTML file with this info but am not even sure if that is possible. I would need to read the plist file, and then write it out as HTML. Is this possible? To write a file out as HTML?
Or an even better question, is there a better way?
Thanks in advance for any and all help!
Geo...

This is what UITableView was made for. Read your plist into an array and feed the contents to the table view through its datasource/delegate methods.

Related

Saving screenshot to CoreData

I'm developing an app that I want the user to be able to take a screenshot with a button (this works, but it's stored to camera roll). I have a need to keep history of these screenshots along with site name, etc.
I've been reading that it's not recommended to save binary data in a sqlite db, so I've stumbled across core data. I'm still learning, but one question that comes to mind is this. Some recommend to save the filename to coredata and then save the image to document directory. I want to read the data back into a table view controller and have the image part of the cell. Will I need to resize the image to the size I want when reading in, or will it automatically size down to what it needs?
Also, when saving to document directory, are those files accessible from the camera roll? I don't want them to be and I'd like to give the user the ability to be able to delete them with the tableviewcontroller.
Please let me know if I need to expand on anything. I'm learning Swift, so I'm sure I missed something.
You should not save it to the Documents directory.
You should instead Allow External Storage of the attribute. Core Data will take care of storing it for you. This is explained in the answer by jansenmaarten to this question.

UITableView survey app and append data to apple numbers

Ive tried to search up documentation and several tutorials but it seems like there's nothing out there. Maybe this is something simple to do, but I just cannot figure it out.
My goal is to make an application that has a series of questions that you fill in. Some tick boxes and some text fields where you fill in some more info. This survey would be on one VC and you scroll down through the questions. After all this I want to append the data to the apple numbers app on the iPad with a specific structure.
How would I go about this? Any resources you can recommend?
T.I.A
I believe that you should generate and export a .csv file with all the data you collect in the app. Save that file to iCloud Drive or to another cloud solution you can integrate in your app, and then access it and open it using Numbers.

Best way to load a lot of images from a server in iphone

I'm developing an app and one of its features is similar to twitter,so I have a table with each "tweet" and I display the user's picture too and I don't know what is the best way to load a lot of pictures. The images come from the server as an url.
My app's structure is:
1- I call to the server, and I get the response
2- I parse the response and I iterate it creating objects
3- I load that objects in the tableview's store
4- I reload the table
I thought one way is when I am creating the object, I load the image and I assign to the object's attribute. I mean, each time I create a object type "tweet" for example, I create the image calling the url with nsdata...
I dont know if that solution is correct or can be better. Can anyone give me a hand? Thanks in advance
Take a look at the SDWebImage API. It will do much of this automatically for you.

Displaying content from an RSS feed in an iphone app

I have seen some tutorials on the subject, but they all go half into it and then leave a person wondering.
How can I stream an rss feed into an iphone app.
I know the xml should be read in, parsed etc.
But then I am not sure how to display the information I need like, images, embedded videos etc.
If someone could just point me in the right direction I would be extremely grateful.
Thanks in advance
First, you need some type of XML parser. You can use the built in NSXMLParser or a slew of other parsers that you will need to download. Each have their pros/cons depending on what type of reading/writing you will be doing with your RSS feed.
To display the data, I would recommend a tableView. You can create custom UITablvewCells for each cell to hold the data however you want to display it. There are several tutorials available for that if you want to Google for it.
As for data, read all the RSS data into an array you create and have the tableView access that array.
Again, there are many online tutorials for this already but it seems like you need help with displaying the data. A quick Google lookup for how to create custom UITableViewCells should provide you lots of helpful links. Good luck.

How to use Core Data in saving all the details which were stored or displayed in a table view?

I am developing an app which parses an Xml or RSS feeds of a magazine..The thing is I have to include an offline capability,ie save the previous results which were displayed in each cell(similar to the New York times app) and then display the saved ones when there is no network connection..
Please help me with the codewise explanation using Core data as I was suggested to use it for this particular task.
Will be of great help for me..
Looking forward for your replies
Regards and Thanks
Arun
You probably want to start here.
OH Boy... CoreData.
Good bye 3-4 days of learning how this works. You wont regret learning about core data but there is a LOT.
#OhioDude has a great link. You can also.
1. Xcode > file > New Project. Select Navigation Based App, make sure the coredata checkbox is checked. Viola you have a project with all the core data templates.
2. There is other sample code on Apples website.
One of the tricky and cool things about core data is that you if you deploy a new version you have to write a template of how you app is to roll the data into the new structure.
During dev as I am changing the DB structure, I seem to get errors, so I just do a build>clean. And rename the string for the DB file to something new.
Good luck. Otherwise NSUserDefaults will be fine.
Or just learn about PLIST's you can simply serialize a NSDictionarly object into a PLIST and save it to the disk in a few lines of code. SUPER easy and no stuffing around with CoreData.