How to add SearchBar in CollectionView? [closed]

你说的曾经没有我的故事 提交于 2019-12-13 04:23:50

问题


Trying to add a header SearchBar CollectionView, but get an error:

Illegal Configuration: Connection "searchBar" cannot have a prototype object as its destination.


回答1:


arrange your view like this, and its related delegate methods.




回答2:


Try to add the "searchBar" above the collection view not upon the header of the collection view. Think if the collectionView has multiple sections, it will definitely cause a problem while scrolling the collectionView, hence you need to add the searchBar just above the collectionView not upon it's header.



来源:https://stackoverflow.com/questions/25460764/how-to-add-searchbar-in-collectionview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!