如何实现“加载新帖子”就像 UITableView 顶部的 Facebook 一样?

发布于 2024-09-13 01:05:17 字数 157 浏览 2 评论 0原文

我喜欢 Facebook 在 UITableView 顶部的“加载新帖子”。这只是 UITableView 的标题“视图”吗?他们如何加载 UITableView 使其隐藏,即 UITableView 的第一个单元格与顶部对齐,因此您必须实际向下滚动才能看到“加载新帖子”区域?

谢谢

I like how Facebook has the "Load New Posts" at the top of the UITableView. Is that just a header "view" to the UITableView? And how do they load the UITableView so its hidden, i.e. the first cell of the UITableView is aligned with the top so you have to actually scroll down to see the "Load New Posts" area?

Thx

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

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

发布评论

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

评论(2

心病无药医 2024-09-20 01:05:18

Neal,或者,您可以尝试使用 MonoTouch.Dialog 框架,该框架增加了对“Twitter for iPhone”之类的拉动刷新系统的支持。

请参阅:

http://github.com/migueldeicaza/MonoTouch.Dialog

Neal, alternatively, you could try using the MonoTouch.Dialog framework, which adds support for a "Twitter for iPhone"-like Pull-to-Refresh system.

See:

http://github.com/migueldeicaza/MonoTouch.Dialog

染年凉城似染瑾 2024-09-20 01:05:18

是的,您可以在 UITableView 的顶部显示自定义视图 - 请参阅其 tableHeaderView 属性。

要最初“隐藏”它,您必须将表格滚动到顶部位置的第一行:

[table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] 
       atScrollPosition:UITableViewScrollPositionTop animated:NO];

Yes you can display custom view at the top of the UITableView - see its tableHeaderView property.

To "hide" it initially you must scroll the table to 1st row at the top position:

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