- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在尝试创建一个类似于 Airbnb 应用程序屏幕截图的提要页面。我从 UITableViewController
开始,并在滚动时向标题添加了动画;标题是那里的绿松石色区域。
现在我想添加这些页面选项卡(“为您推荐”、“家庭”、“体验”和“地点”),并且弄不清楚我应该如何构建我的 View 。仅供引用,每个选项卡都是一个 tableView
。现在我没有页面选项卡的结构是:
UITabBarController
UIViewController
(包含UIView
header ,UITableView
内容)我能想到的选项很少:
UITableViewDataSource
,所以点击一个标签只是改变了dataSource
和reloadData()
UIViewController
将包含一个 UIScrollView
contentView,因此单击选项卡是 addSubView
到 contentView 和 addChildViewController
到控制者根据我的研究,不推荐选项 #2,因为它将 tableView 放在 scrollView 中。但是选项 #1 要求所有 tableView 具有相同的 cellID 才能出队?听起来硬编码。请告诉我这种情况的最佳做法!谢谢。
最佳答案
根据您的描述,您可能应该考虑使用容器 View 。通过这种方式,您将对所描述的每个案例都有单独的 View 。
给你的例子:
在 Storyboard中:
听到的是切换 View 的代码。
class ViewController: UIViewController {
@IBOutlet weak var containerViewA: UIView!
@IBOutlet weak var containerViewB: UIView!
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func showComponent(_ sender: UISegmentedControl) {
if sender.selectedSegmentIndex == 0 {
UIView.animate(withDuration: 0.5, animations: {
self.containerViewA.alpha = 1
self.containerViewB.alpha = 0
})
} else {
UIView.animate(withDuration: 0.5, animations: {
self.containerViewA.alpha = 0
self.containerViewB.alpha = 1
})
}
}
}
关于ios - 如何创建 Airbnb iOS App Explore 选项卡?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42899815/
我尝试托管 knowledge-repo (airbnb)在heroku上。 我发现了几个问题,例如在尝试初始化 /app 时作为知识库: 我注意到,如果我使用 knowledge_repo --re
我正在尝试设置 Enzyme(由 Airbnb 编写)以便在 React 中运行一些 UI 测试。但是,无论我有什么配置(并且我已经尝试了几种),我都会不断收到此错误。我添加了一个 .babelrc
使用 air bnb 应用程序,如果您点击选项卡菜单上最右侧的图标,它会打开一个用户菜单,该菜单从顶部右侧滑入,但只占屏幕的一半。下面屏幕的其余部分变暗。 如何实现?它是否需要自定义 segue 或
希望有好心人可以帮助我。我没有足够的 google api 和 jquery 知识来实现我所需要的。 我有一个谷歌地图,你可以在这里看到演示 http://divinethemes.eu/map/
Airbnb 最近推出了包含视频标题的新设计。我无法弄清楚他们是如何实现视频标题始终与浏览器窗口保持相同比例,同时视频保持全宽和居中。 因此,无论我的浏览器窗口有多大,我都想要一个 50% 高度的视频
我似乎遇到了 AirBnB linting 悖论。 我有以下行: const pagePromiseGenerator = (graphql, createPage) => (gqlNodeName,
当我运行时( export PKG=eslint-config-airbnb; npm info "$PKG@latest" peerDependencies --json | command sed
我正在尝试获取出现在 Airbnb 中的列表的纬度和经度,我认为该信息位于嵌入式谷歌地图中。当我试图通过使用 lxml 库或 Beautiful Soup 复制完整的 Xpath 来抓取该对象时,我无
我正在尝试创建一个像 Airbnb 这样的搜索字段,您在其中开始输入内容,它会自动完成您输入的内容。我开始使用jQuery Geocomplete但我似乎找不到一种方法来设置 CSS 样式。 任何人都
我一直在使用爱彼迎knowledge repo在本地主机上。问题是我的网络开发经验很少,所以我对如何让它在线运行一无所知,最好是在受密码保护的网站上运行。 到目前为止,我只使用 runserver 查
我正在尝试添加 AirBnB React-dates 。所有功能都正常工作,除了一件事(不打开已选择日期的月份)。 当我分配开始日期和结束日期时,它会选择范围但不显示所选月份。它显示当前月份。 例如:
我正在使用 Ruby on Rails 制作一个网站,引用了 Airbnb,但我发现很难制作以下 URL 结构。 https://www.airbnb.com/help/article/767/wha
我想要像 Airbnb 房间细节布局那样的两层重叠滚动布局 类似 Airbnb 的重叠滚动: 但是我的 XML 布局文件输出以下结果: 这是我的布局代码:
如何airbnb.com当您将鼠标悬停在 Logo 上时实现动画?我认为它使用了 css3,但我无法完全理解它。 最佳答案 你是对的,它使用了 CSS3 动画: @-webkit-keyframes
我正在尝试添加 airbnb-react-date .在我重新打开日期选择器时选择开始日期和结束日期后,日历显示当前月份而不是所选开始日期/结束日期所在的月份。 例如:如果我设置开始日期 = 2017
// bad class Listing extends React.Component { render() { return {this.props.hello}; } } //
我们已经使用 LocalExecutor 为我们的 ETL 设置了 Airbnb/Apache Airflow,并且随着我们开始构建更复杂的 DAG,我们注意到 Airflow 已经开始使用大量的系统
我在用于移动浏览器的 Web React 应用程序中有一个 react-dates 组件。该组件垂直显示月 View 。 组件初始化显示 3 个月。要转到下个月,用户需要单击一个按钮。 目标是实现
我正在尝试使用 epoxy 显示一个简单的 TextView 在回收站 View 中,但它没有出现。我可能做错了什么。 我期待这样的事情 但我得到的是这个 //build.gradle imp
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 2 年前。 Improve th
我是一名优秀的程序员,十分优秀!