Hi, I want to add a search option at the top of the UICollectionViewController . I tried some codes from here, but it does not work for me.
What i have done so far:
- Created by
UICollectioViewController - Then check the box for the title
- Add
UITextfield to title bar - Created a
UICollectionViewReusablecell , and then declared my UISearchBar .
But I don’t know how to take the value from this UITextfield and check with the values in my array “All details” and display the results in a table?
Currently in UICollectionViewCell I am using this code to enter text in a UITextfield :
[searchTextfield addTarget:self action:@selector(check:) forControlEvents:UIControlEventEditingChanged];
Please check this link below. I did not understand this, maybe you can help me.
http://www.appcoda.com/supplementary-view-uicollectionview-flow-layout/
source share