gpt4 book ai didi

iOS7:如何在 iOS7 上添加固定的搜索栏,如联系人?

转载 作者:可可西里 更新时间:2023-11-01 05:35:27 25 4
gpt4 key购买 nike

我查了很多问答,都没有好的结果。所以我不得不在这里问:

我想在导航栏下方添加一个搜索栏。

这个搜索栏应该是固定的。就像下面 iOS7 上的联系人一样。

iOS7 contacts任何人都可以帮我弄清楚吗?

最佳答案

你有一个 View Controller 。它有一个主视图。在该主视图内部是一个搜索栏 (UISearchBar),在其下方是一个表格 View (UITableView)。

您的 View Controller 嵌入在导航 Controller (UINavigationController) 中。

UINavigationController

MyViewController (UINavigationController) - child of the navigation controller

UIView - main view of MyViewController

|--- UISearchBar (subview of UIView)
|
|--- UITableView (another subview of UIView)

关于iOS7:如何在 iOS7 上添加固定的搜索栏,如联系人?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22133973/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com