iPhone:在表视图的第一行插入新行

发布于 2024-09-02 13:20:34 字数 177 浏览 2 评论 0原文

我从标记为 tofrommessage 的三个文本字段捕获值。

当用户填写这三个文本字段并点击按钮时,我需要将这三个文本字段中的值显示在表视图的新行 1 中,即新行应该是向下推动先前存在的行的第一行。

我该怎么做?

问候, 希希尔

I capture values from three text fields labeled to, from and message.

When the user fills in these three text fields and hits a button, I need the values in these three textfield to be displayed in a new row 1 of a table view i.e. the new row should be the first row pushing the previously existing rows downward.

How can I do this?

Regards,
shishir

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

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

发布评论

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

评论(1

丢了幸福的猪 2024-09-09 13:20:34

定义表视图行的数据将保存在某种类型的数据集合中,例如数组。您需要添加新数据以将字段中的数据插入到数组的第一个索引位置。当表格重新加载时,其数据源将按顺序读取数组,新数据将自动出现在表格视图的第一行。

The data that defines the rows of your tableview will be held in data collection of some kind such as an array. You need to add the new data to insert the data from the fields into the first index position of the array. When the table reloads, its data source will read the array in order and the new data will appear in the first row of the tableview automatically.

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