Monotouch:构建一个“控制台”?

发布于 2024-12-23 05:33:55 字数 261 浏览 1 评论 0原文

我正在构建一个客户端/服务器应用程序。服务器向我发送了大量信息,我需要在 iPhone 上的“控制台”中显示这些信息。我需要显示几列(时间、用户、消息)。

对此最好的方法是什么?

我考虑过创建一个 UIWebView 并创建一个表..但是我能够在信息来自服务器时添加行吗?我可以连接到 UIWebView 中的表并时不时添加新行吗?

我应该使用 UITableView 构建它吗?

你会怎么办?

谢谢!!!

莫乔

I'm building a client/server app. The server sends me lots of information, that I need to display on the iPhone in a "console". I need to display several of columns (time, user, message).

What is the best approach for this?

I thought about creating a UIWebView and create a table .. but will I be able to add rows as information comes from the server? Can I hook into a table in the UIWebView and add a new row now and then?

Should I build it using a UITableView?

What would you do?

Thanks!!!

Mojo

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你的心境我的脸 2024-12-30 05:33:55

我会使用 UITableViewController 并创建一个 TableDataSource 来从服务器读取行。
您可以设置行格式或使用自定义控件(我通常使用自定义行控件)。

希望这有帮助。

I would have used a UITableViewController and create a TableDataSource which would read the rows from the server.
You can either format the row or use a custom control for it (I usually use custom row control).

Hope this helps.

夢归不見 2024-12-30 05:33:55

我不知道您的 UI 需要有多复杂,但如果基本外观就足够了,为什么不简单地使用 UITextView 并使用选项卡对其进行格式化?
然后,您可以在收到文本时继续附加文本。
为了防止用户乱搞,只需将 UserInteractionEnabled 设置为 false 即可。

I don't know how sophisticated your UI needs to be but if the basic look is enough, why not simply use a UITextView and format it using tabs?
You can then keep on appending text as you receive it.
To prevent the user from messing around with it, just set UserInteractionEnabled to false.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文