Closed jz709u closed 7 years ago
Thanks J, I will review this tomorrow hopefully. Almost finished on some big refactors on the web app.
Hmm..you're using UITextField for search instead of UISearchBar. This is not standard behavior for iOS apps. We want to make sure we replicate Apple apps as much as possible, because Apple will try hardest to preserve those, and we want to be persevered as well ;)
Can you please update this to use UISearchBar, similar to Apple Mail app on iOS. It should be hidden by default, but if user scrolls up, it will show. I'm not sure if that requires a UISearchController. Maybe you can just set tableView.tableHeaderView = searchBar. Not sure really..
Done
Changed
Thanks @jz709u. Looking good, will test time this week.
Looks great. But how can we make it so that the search bar is hidden by default?
it's not hidden by default? In which case is it showing by default? I have this code: tableView.setContentOffset(CGPoint(x:0,y:-15), animated: false) in viewWillAppear.
I tested around and the only case where it doesn't hide again is when you press a note and then come back
can you explain to me in what cases should it be hidden anytime you present the notes page is that it?
@jz709u it should be hidden when you launch the app. Check out Mail.app. When you launch the app (remove from background first), searchbar will be hidden and remain hidden until you show it. Then it will remain in view until you hide it via scroll.
test it now please
This doesn't work because this is a universal app, so you can't use constant contentOffset. Not displaying correctly on iPad.
But actually
tableView.setContentOffset(CGPoint(x:0, y:-self.searchBar.frame.size.height/2 + 2), animated: false)
seems to be working. Still not ideal though.
Actually turned out to be an issue with that too. I went the tableHeaderView route and that seems to be better: https://github.com/standardnotes/iOS/commit/db21ca61b4105ab15202ce4a6066102941bb7dcc
-Allow inline search of notes -Searches text, title, and tags