Ios 在UICollectionViewController标题上添加UISearchBar
您好,我想在Ios 在UICollectionViewController标题上添加UISearchBar,ios,xcode,uitextfield,uisearchbar,uicollectionview,Ios,Xcode,Uitextfield,Uisearchbar,Uicollectionview,您好,我想在UICollectionViewController顶部添加一个搜索选项。我在这里尝试了一些代码,但它对我不起作用 到目前为止,我所做的是: 创建了一个UICollectioViewController 然后选中标题的复选框 在标题行中添加一个UITextfield 创建了一个UICollectionViewReusablecell,然后在那里声明myUISearchBar 但是我不知道如何从UITextfield中获取值,并使用数组“All Details”中的值进行检查,然后在t
UICollectionViewController
顶部添加一个搜索选项。我在这里尝试了一些代码,但它对我不起作用
到目前为止,我所做的是:
UICollectioViewController
UITextfield
UICollectionViewReusablecell
,然后在那里声明myUISearchBar
UITextfield
中获取值,并使用数组“All Details”中的值进行检查,然后在tableview中显示结果
当前在UICollectionViewCell
中,我使用此代码将文本输入到UITextField
:
[searchTextfield addTarget:self action:@selector(check:) forControlEvents:UIControlEventEditingChanged];
请检查下面的链接。我不明白,也许你能帮我
http://www.appcoda.com/supplementary-view-uicollectionview-flow-layout/
请在Github中找到下面带有示例代码的链接。您可以使用以下链接下载UICollectionView并将其与UISearchBar集成