i make following ui app: have search bar user can search stickers , has option add new one. i've tried several approaches ui none of them work well. first tried embedding
uisearchbar
, uibutton
in uinavigationbar
using them bar button items didn't let me work auto layout. tried similar thing uitoolbar
. figured uistackview
easier lay out. , was. in image above have uisearchbar
, uibutton
in uistackview
. problem have hairline below search bar not below button. advice on how this?
update: added code remove hairline it's leaving 1 px of black beneath it. here's code:
override func viewdidload() { super.viewdidload() let color = uicolor.clear() searchbar.layer.borderwidth = 0 searchbar.layer.bordercolor = color.cgcolor // additional setup after loading view. }
and here's picture of problem:
if don't want spend time fighting uisearchbar, may own searchbar, based on simple uiview.
this way sure keep control when ios upgraded on years..
i personnaly think not right solution subclass or customize os classes.
Comments
Post a Comment