如何让桌面视图像 iPad 上的 YouTube 应用一样?

发布于 2024-09-07 00:46:52 字数 90 浏览 2 评论 0原文

我想创建一个看起来像 YouTube 应用程序的应用程序。我想要右侧的表格视图或索引为 1 的对象。我尝试这样做,但问题是我的表格视图超出了范围。我看不到其中的文字?

I want to create an app that looks like the youtube app. I wanna have the tableview on the right or the object at index:1. I tried doing it but the problem is that My tableview is going off the bounds. I cant see the text in them?

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

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

发布评论

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

评论(1

幼儿园老大 2024-09-14 00:46:52

我不完全确定您对右侧的“tableview”或索引:1 处的对象有什么疑问。

但 YouTube 应用程序似乎只是使用自定义 UITableViewCell 对象。您可以在 Interface Builder 中(或以编程方式)轻松创建这些,然后在 cellForRowAtIndexPath 委托方法中返回它们。

您可以在与父视图相同的 NIB 文件中或在单独的文件中创建表视图单元格。

请注意,如果您创建自己的表格单元格,您可能需要实现 heightForRowAtIndexPath (tableView 委托方法)并仅返回
self.myCell.frame.height;

I'm not entirely sure what you are asking about the 'tableview' on the right or object at Index:1.

But the YouTube app appears to simply be using a custom UITableViewCell object. You can create these easily in Interface Builder (or programmatically) and then return them in the cellForRowAtIndexPath delegate method.

You can create the tableview cell either in the same NIB file as the parent view or in a separate file.

Note that if you create your own table cell, you will probably want to implement heightForRowAtIndexPath (tableView delegate method) and just return
self.myCell.frame.height;

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