iphone uitableview 到另一个视图

发布于 2024-09-08 23:24:24 字数 106 浏览 0 评论 0原文

在我的程序中,我需要一个表格视图,当您单击一行时,视图向左滚动并显示详细信息(例如邮件......) 我该怎么做? 我解释一下......这是一个自动的事情,或者我需要手动管理视图的动画? 提前致谢

in my program I need a tableview and, when you click onto a row, the view scroll left and show the details (like the mail for example...)
how can I do this??
I explain... it's an automatic thing or I need to manage by hand the animation of the view??
thanks in advance

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

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

发布评论

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

评论(2

扎心 2024-09-15 23:24:24

我使用 UINavigationControllers 来实现单击该行时左侧细节动画的效果。因此,您需要在 UIViewController 或 UITableView 控制器之上有一个 UINavigation 控制器来控制您的表格。

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 

{
...我的代码

[self.navigationController pushViewController:myViewController animated:YES];

}

I use UINavigationControllers to achieve this effect of the detail animating left when you click on the row. So you need a UINavigation controller above the UIViewController or UITableView Controller that controls your table.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 

{
...my code

[self.navigationController pushViewController:myViewController animated:YES];

}

情未る 2024-09-15 23:24:24

您的情况正是 UINavigationController 类的用途 - 它将处理您的控制器层次结构,并为您进行动画转换。要了解如何使用它,您可以查看 Apple 的 NavBar 示例。

Your case is exactly what UINavigationController class is for - it will handle your controllers hierarchy and will do animated transition for you as well. To learn how to use it you can have a look at Apple's NavBar sample.

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