显示“高分"的最佳方式结果 [英] Best way to display a "High Scores" Results

查看:25
本文介绍了显示“高分"的最佳方式结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我要感谢大家通过本网站提供的所有帮助.它让我几乎可以发布我的第一个 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!

好的,所以我的最后一部分是:我有一个游戏,允许用户保存他们的高分.我更新了一个包含用户名称、级别和分数的 plist 文件.

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.

现在我想创建一个屏幕来显示前 20 名的高分.什么是最好的方法来做到这一点?起初我认为可能会使用此信息创建一个 HTML 文件,但我什至不确定这是否可能.我需要读取 plist 文件,然后将其写成 HTML.这可能吗?将文件写成 HTML 格式?

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?

预先感谢所有帮助!

地理位置...

推荐答案

这就是 UITableView 的目的.将您的 plist 读入一个数组,并通过其数据源/委托方法将内容提供给表视图.

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.

这篇关于显示“高分"的最佳方式结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆