I'm using Swift 4. I wish to show the navigation bar large title. When I scroll I expect the navigation bar to expand/collapse.
I'm showing same content on both collection view and table view. Like showing data on tile view and list view. When the user toggles the view, either collection view or table view will show.
I have referred the link Shrink large title when scrolling (not UITableViewController) iOS 11.
As suggested in the above link, I have added the collection view next to the safe area. So the navigation bar with large title gets scrolled. No problem with the collection view.
I have added the table view next to the collection view. Here the large title doesn't scroll up. If I interchange the collection view and table view on storyboard, the large title works fine on table view.
But I have to show both the controls on my view and the large titles should work on both the controls.
Kindly help me to solve this issues. Thanks in advance.
Related
This issue is something I have been struggling with for a while and have been able to get around for the most part by using was seem like hacky techniques but I am needing a better way to accomplish this now.
My question is how do you add UI elements above a table view (in a table view controller) and make them stick to the view (the should not scroll with the table view). For example adding a navigation bar is simple because you can just embed in a navigation controller to the table controller. But what if you want to add say a tab bar below the navigation bar but above the table view? So that the table view scrolls and the tab bar sticks to the bottom of the navigation bar and does not scroll with it.
Ive tried to do this by placing it in the storyboard just below the navigation bar and just above the tableview but it just scrolls with the table.
Any help on this is very much appreciated!
I have several different tableviewcontrollers connected to tabs. All were created in storyboard.
For all but one, I don't have a search bar. For one, however, I do have a search bar. When you view the one with the searchbar the table view does not take up the whole space at the bottom. At the top it shows the search bar as you would expect. But at the bottom, it leaves empty space.
In the measurement inspector for the storyboard, the view controller appears to have the same dimensions 600x600 as the tableview for the other view controllers.
Some answers suggest that the table row height may differ with the search bar controller but I tried changing that and it did not have any effect.
Can anyone suggest what might be causing this problem?
I have a UICollectionView that scrolls with a bunch of images and I want to have a pinned Navigation Bar on the top that stays there even as you scroll. I moved the cell down in the UICollectionView in order to make room for a navigation bar and I dragged one into the View. I can see it in my story board however it is just a black view when I run the app. Can anyone please show me how to make this nav bar appear and how to make it stay pinned at the top even as you scroll. Thank you so so much. (I tried to attach photos of my problem but it says I do not have enough reputation to post images) I hope you guys are able to understand my problem and direct me in a way in which I could add a navigation bar that stays pinned on the top of a CollectionViewController
Drag a navigation controller into your storyboard. You probably want to position it just to the left of the view controller that has the collection view.
Delete the view controller that Xcode automatically attaches to the navigation controller.
Right click on the navigation controller and drag from root view controller over to your view controller where you have your collection view.
If necessary, move all segues that went to the collection view to the navigation controller instead.
I have a table view controller in my app. I have many table view cells in it. When I scroll down in the table view, the toolbar/navigation bar disappears. When I scroll back to the top of the screen, it is visible again. Please tell me how to have the toolbar/navigation bar visible at all times.
refer below link, it may help you. It's an example of simple navigation controller with UITableView:
http://www.techotopia.com/index.php/Creating_a_Navigation_based_iOS_5_iPhone_Application_using_TableViews
Just as the effect of the safari browser in iOS, When the web page is scolled down, the navigaton bar go down together, as the web page is scolled up, the navigation go out from the view, how to impletement like this?
Thank you very much!
You should make that navigation bar the table header view (not to be confused with a section header view). A table view has a property, tableHeaderView, which you can set to any custom view you want. It will appear at the top of the table view, and will scroll with it.