Comments (12)
from shsearchbar.
What exactly are your problems? Can you make a list? Then I can try to reproduce and fix them. Initially it looks pretty good right?
from shsearchbar.
Hey Stefan, thanks for your comment. Basically the problem is that when the user starts typing text the width of the text field changes (becomes a lot thinner).
from shsearchbar.
You can try to add the search bar as the title view of a navigation bar to reproduce this issue.
from shsearchbar.
Did you ever manage to get around this issue?
from shsearchbar.
in your examples, you use the search bar in the view controller content view. how do you use it as a navigation item title view?
from shsearchbar.
Hey, sorry for the delay. At the moment I don't have much tie to work on my projects. Work consumes a lot and I was ill so I spent a lot time on my couch
Actually I didn't plan to use it there yet but now I thought it would be another very good example
I think I'll find time in December to have a look on this topic.
from shsearchbar.
from shsearchbar.
Why you don't use the standard UISearchBar (maybe in combination with UISearchController) which is made exactly for your purpose?
from shsearchbar.
Fine, thanks so much for your help. I'll be using the default search bar.
from shsearchbar.
Hey @cecexx , finally I found some time to check how you could use my search bar in the UINavigationBar. I extended the example app with your use-case. See 7a49309 for details. All you need to do is implement your titleView class and add SHSearchBar maximized to it. Then implement intrinsicContentSize in that class as I did in https://github.com/Blackjacx/SHSearchBar/blob/develop/Example/iOS%20Example/SearchBarTitleView.swift.
Then all should work. If you like to implement the standard UISearchBar then you could have a look on my answer on StackOverflow on how to do it right: https://stackoverflow.com/a/47908688/971329.
The only thing I could not figure out is how I can set a custom height on my search bar in the navigation bar. The navigation bar will not adapt its height to the height I set for the search bar.
from shsearchbar.
Cheers, I appreciate it! Although I've switched to the standard UISearchBar, thank you so much for keeping me updated on this.
from shsearchbar.
Related Issues (20)
- [UI] Transfer active/inactive state to the left and right views of the UITextField
- Add Carthage Support
- Can't Change Font HOT 1
- test if the default values of the config are as expected
- Project: Remove Config Object
- Convert Project to Swift 4
- Add tests for useCancelButton
- 'pod try SHSearchBar': build fails HOT 8
- Make `localized` internal to avoid namespace conflicts
- rtl support HOT 1
- Does not support storyboard HOT 1
- Fix config setting HOT 2
- SHSearchBar can be used in tableview HOT 2
- Compilation Issues: Key is not a member of NSAttributedString, etc HOT 3
- Search Bar height & remove separator HOT 5
- Enable Mosule Stability HOT 1
- 🚨Add to Package List HOT 1
- 🚨 Fix Testing for SPM Packages HOT 2
- please keep cocoapods HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shsearchbar.