IQKeyboardManager - keeping the UINavigationBar sticky to the top - ios

I'm using IQKeyboardManager in Swift to handle the keyboard in my app (it's a chat app and the UICollectionView and the UITextField should move up and down according to the keyboard's position). It's working great.
My only problem is that it moves the whole view up, including the UINavigationBar and that's why it looks very weird. I want the UINavigationBar to remain sticky on the top of the screen.
Any idea how can I do that?
Thank you

Related

ios11 Attach custom view below UISearchController UISearchBar that hides with the Searchbar

I had a UISearchBar with which i attached a custom view below which gave some buttons for filtering and sorting... now i want to use the ios11 UISearchControllerthat provides a searchbar which smoothly hides into the top NavigationBar. I looked around some and tested a few things but cant figure it out properly. The custom view should hide when scrolling up as well.
Any tips or anything i can read up to get a hold on this? (I'm relatively new to ios development)

Autolayout UITabBar items in iOS

I am trying to implement a simple mobile browser in iOS. I am trying to include two UIToolbars; one at the top and one at the bottom. The top toolbar will consist of a UITextField and a GO button. The bottom toolbar will consist of back and forward buttons.
I want this to work correctly in both portrait and landscape modes. However, I noticed that autolayout does not work for UIToolbar items. So I cannot set constraints for my UITextField and the buttons. How do I fix this?
Yes autolayout does not work for UIToolbar items because they are mostly UIBarItem instead of subclass of UIView.
You can still set up constraints by using special items

How to make Navigation bar height become smaller when UITableView scroll down?

How to make UINavigationBar height become smaller when UITableView scroll down?
And when scroll up, the UINavigationBar height back to normal,
just like what safari does.
Thanks
There are a ton of third party options to create an effect like that. I'd start by looking at this question on SO:
Imitate Facebook hide/show expanding/contracting Navigation Bar

Creating custom implementation of navigation bar

I wish to create a view similar in behavior to the UINavigationBar.
I cannot simply customize the bar as I want the space to be taller and I want to have several other subviews on it other than just UIBarButtonItems. So, I want to be able to create a similar implementation including the floating/translucency effect.
I good example of this is the address bar in Safari in iOS 7. The UITextField on the bar is something that cannot be added on the default UINavigationBar. Nevertheless, the Safari bar still has the transparency.
I do not want it to shrink like it does in Safari when scrolling down, I simply want it to remain just like a UINavigationBar would. I was thinking about adding a subview to the root UIScrollView, but this would scroll along with everything. I want this to remain at the top, but I want other elements to be able to scroll.
How would I go about implementing this?
If you are confident that you can't to this with the default UINavigationBar, you could shrink (from the top) the UIScrollView with whatever the size the custom UINavigationBar is and then add the navbar as a subview to the root view at (0,0) coordinates. It will be independent from the scroll view.
On the other hand, if you need this to be persistent through the application and use it in all of the screens, it will be wise to make some changes starting for the AppDelegate, but that's for another question.
For the iOS 7 transparent-style part, look here: FXBlurView. Best of luck!

How to make keyboard stay fixed to UIViewController

I'm using JASidePanels to have a slideout-menu in my app. One of the views I have has a always-visible keyboard. My problem is that, when in this keyboard-fixed view, and I show the menu, the keyboard stays at the center of my window instead of following the view i hid to show the menu. I understand why this is, but I would like to tweak it so it follows the view im swiping to the right, instead of staying in the middle.
TL;DR how can I stick a keyboard fixed to a UIView, instead of staying in front of whole app window

Resources