Scroll View on Header View of Table view controller - ios

I am implementing a Table View with a short cut menu on header view of the tableview. the example i have is almost close to the screen shot below.
But i have implemented a simple header view on table view with menu, in this case the header view just have one set of menu and not scrollable vertically. but i would like to add the scrollable component so can accommodate more than just 8 icons.
here is a picture of what i have done
Any help advice will be great ! if some examples will be greatly appreciated.

Just put a UICollectionView in your tableViewHeader.

Related

ioS Scroll View with dynamic table View

I want to create a “ViewController” Scene with a “Scroll View” and in this view there should be a “Table View” at the top, 1 “segmented Control and 2 tables at the bottom.
The “Segmented Control” should switch the bottom table views.
Like in this picture:
My problem with this scene is that the table should have a dynamic height.
I need the bar over the complete page and not in the individual tables.
Is it possible to create such a scene and if yes, which constraints do I have to set?
I hope you can help me! Thanks a bunch!
tableView inside scrollView is a disastrous idea, because
tableView itself have its own scrollView.
Scrolling will be very sticky and it may freeze UI.
The best solution comes on my mind is to take single tableView and manage multiple sections.
The Green portion will be your first section.
Segment control will be second.
and blue section will be third.
In this way you can achieve both dynamic height as well as single scroll bar condition.
Let me know if it works.

Nested scrollview with table view in ios

I have a scroll (Scroll view 1) view which contains profile View and Custom Segmented Control which replaces the content in the nested scroll view (Scroll view 2). On segmented control tab change I added the table view inside nested scroll view (Scroll view 2). I am not able to scroll to the whole view. How can I achieve this?
one simple solution is to calculate your nested scroll's content height and give it a fixed height constraint so it wont be able to scroll by itself anymore
but a little more complicated solution is HERE
I hope it helps

Collection view as a sticky header in swift

I'd like to know how would you create a collection view embedded in a table view like the one you can see in Tinder app while you browse through someone's pictures.
It's obviously only a paging enabled collection but I don't know how to make it sticky at the top while still scrollable.
Thank you for your help
J.
it is embedded in a navigation controller, so the bar at the top is alway fixed. plus it is not a collection view embedded inside a tableview, that would be ridiculously redundant. It is just a CollectionView with animations.
You can use table view section header for this.
Create a UIView with UICollectionView in it.
Make this UIView as the section header of table view section. This UIView will then stick to the top for that particular section when the table is scrolled.

One section of the view controller is still and one section horizontally scrollable

I would like to construct a view controller where one section of the view controller would be still and one section scrollable.
Both sections have headers where as well, one is still and one is moving along with the content in the section.
I do not want the cells in the section to be scrolled separately. All cells should move at the same time along with the header.
I have added an image to make my point little more clearer.
Use UICollection View for both view and disable scrolling for one view and enable scrolling for another view
you can probably add to your UIViewController view a UITableView on the left with fixed size (for example 150px) and vertical scroll disabled and a UICollectionView with horizontal flow and ,if needed a, with custom UICollectionViewLayout (but i think that you just need the classic UICollectionViewFlowLayout) for the right part that fits the remaining space.
Here you can find the component's documentation:
https://developer.apple.com/reference/uikit/uicollectionview
https://developer.apple.com/reference/uikit/uitableview

iOS app shifted right and can't view full table

I'm having trouble setting a layout for my iOS app. The entire app is shifted right for some reason as you can see by the label and buttons which are in the middle of the scroll view.
I also can't seem to display the entire table. In the screen shot below "another Item" is supposed to have a checkmark and it is only visible if I shift the table in Main.storyboard far to the left where the actual label for the cell item is half visible.
I have a scroll view inside of the view controller and then a label and three buttons as well as a table view with table view cells.
Thanks to Lucas for the answer
Are you using Auto Layout with that storyboard? Looks like you might not have set your constraints up properly. You might also want to take a look at Xcode's new View Debugging functionality.

Resources