How to change the direction of filling the UICollectionView? - ios

I would like to know how to change the direction of filling the UICollectionView when the scrolling direction is horizontal. The UICollectionView has 2 rows and 5 columns that are filled up from a one-dimensional array. Thanks.
Horizontal scrolling with vertical filling
Vertical scrolling with Horizontal filling

We can do same Springboard behavior using UICollectionView and for
that, we need to write code for a custom layout. My friend has
achieved it with custom layout class implementation with
SMCollectionViewFillLayout.

Related

Horizontal image list in IOS on top of card

Hi I am trying to achieve this:
Every search gives me a horizontal list that is contained inside the card and every image disappears into the cards border. Any tips on how to achieve this effect?
First of all, I'm not sure if your question is a programming question, but I'm answering your question anyway.
So you could have UICollectionView and each item (row) has another UICollectionView.
Since I prefer UITableView most of the time, I would use UITableView and each row (each UITableViewCell) has a UICollectionView for displaying the horizontal scrolling albums.
The white container in each cells/rows is merely a UIView with constant height and dynamic width (leading and trailing are clipped to the superView with inset, say 10.0). Then the UICollectionView is clipped to the superView (UITableViewCell) with no offset or zero offset/inset.
If for adding shadows to your view with rounded corners, there are multiple ways to achieve that, but I'm giving you a quick link for your reference: https://medium.com/swifty-tim/views-with-rounded-corners-and-shadows-c3adc0085182
I hope this helps!
Put three collection views that that stretch between the card borders. Let the collection views have a transparent background.
Then place the three smaller white views behind the collection views. Give these views a drop shadow.

Implement overlay-view at the bottom of the screen with horizontal cards/cells in it

I have a map-view and a tableview in my app but i would like to merge them into one screen. I really like the way yelp showing all the locations items in a horizontal scroll view over the map.
I want to implement similar overlay-view at the bottom of the screen with horizontal cards/cells in it.
Is it a UICollectionView, UITableView, UIPageControl, UIScrollView or something else?
Please suggest me and point me in right direction.
It’s a horizontal scrolling direction UICollectionView and cells in it, with property Paging Enabled equals true. you will need to manage the layout of it in sizeForItem.
Hope this helps you out

Scroll horizontally in UITableView - Swift 3, iOS

I need to horizontally scroll through a list of thumbnails at the bottom of the screen that shows all the user's recently taken photos / videos.
I created a UIScrollView with a UITableview inside of it.
Is this the correct approach because I can't seem to find an override method in its superclass for scrolling direction?
Most of the topics I can find online deals with putting a UIscrollview inside a TableCell, which will not work for my specific application?
The hierarchy is:
View > Scroll View > Table View > Table Cel > Content > PhotoThumbnail
Below is a screenshot of what I'm trying to do:
I am not really sure why do you want to use UITableView for horizontal scrolling which lay out there cells in vertical manner. If you want horizontal scrolling I would recommend using UICollectionView where cells can be added horizontally or vertically or both.
Still if you want tableview to be scrollable in horizontal direction I would suggest you to check this project to get inspiration or using it.
https://github.com/alekseyn/EasyTableView
Instead of using UITableView you can use UICollectionView to achieve the desired result i.e, horizontally scrollable cells with imageView and other elements that you need.

UICollectionView items flow direction vertical and scroll with horizontal direction

i have UICollectionView, i need Horizontal scroll direction and Vertical items flow. It's possible with native instruments?
You can have a parent UICollectionView scrolling vertically & each section or row can contain child CollectionViews scrolling vertically.
To maintain sanity, do setup your dataSource's for parent & child's independent of each other.
You should be able to utilise same handler for all child collectionViews.
You have add UITableView inside that tableviewcell add the UICollectionView and also set the UICollectionView Scroll Direction is Horizontal.

UITableView - How to specify start position for horizontal scrolling

Could anybody please help me understand if there is a way to provide the start position for horizontal scrolling in UITableView?
Basically, I have enabled horizontal scrolling by giving content inset like [self.tblData setContentInset:UIEdgeInsetsMake(0,0,0,500)];. But, I do not want the section headers to scroll. Is there a way that I can fix the section headers while scrolling horizontally?
If you want to scroll the view horizontally, i suggest that you should replace UITableView with UICollectionView。
If you want to scroll just one cell horizontally, you can add UIScrollView into cell.contentView.

Resources