I have an UITable view which shows news feed. In each cell there could be no images at all, or 1-5 images. How can I make it work as shown on the screenshots?
Related
I have a UICollectionView that is filled with images, videos, and sound bytes. Everything is working great! I am however, concerned about bandwidth usage.
I am uncertain exactly how UICollectionView with dequeued-reusable cells work, in regards to when these items will be downloaded from storage.
Let's say I have this simple cell.
selfieCell.imageView.sd_setImage(with: URL(string: message.stringOrKey), completed: nil)
return selfieCell
For purposes of answering my question, lets say I have 100 of them in a collection view cell, and only 3 cells are shown at a time.
Do all 100 images load when UICollectionView is loaded?
Or does the UICollection view wait until the cell is about to be shown to set the image (and thus download the file?)
Thank you for your help.
Only 3 cells are shown at a time
The loaded cells are only the visible ones when you scroll cellForItemAt is called and other cell is deququed from the ones who will hide at top same when you scroll up again
Also caching image like sdwebimage won't load it again from server when the relevant cell is shown again
I am stuck in below task where I need similar animation in UITableView.
But I am also not sure what component used in this video (UITableView or UICollectionView)?
Animated component
Any leads highly appreciated
First up, there are multiple ways to implement this.
If the video shows the exact output you expect, you can achieve this with two UITableViews. One for the names on the bottom and one for the images on top.
Now, within the scrollViewDidScroll method, listen to the scroll changes within the tableView that contains the text and scroll the tableView with the images accordingly. If you're going for constant sized cells, the scroll coeffecient would be the sizeOfCellWithImage:sizeOfCellWithText
I am developing port of application from android. In my application In one of screens I present to user collection of parameters grouped by sections. Every section is presented as page of tile items in spannable grid. User can scroll betwen sections horizontally like in pager while pages are not scrolled vertically. Additionally on top of screen user has clickable tabs showing all availible sections by title. On android I achieaved this by creating nested RecyclerViews (one lvl for sections, one for tiles), combined with DiffUtil for quick content updating.
I am completly new in iOS development but I want to create something similar. After little dive into basic components it sems like UICollectionView might be the rightest joice. In my app I am trying to use MVVM approach using RxSwift and RxDataSource. The last one has support for sectioned UICollectionView and I wonder if there is any possibility to create the whole view by using single UICollectionView. Sections would scroll horizontal and every section would contain grid elements? Or maybe can I nest one RxDataSource in other. Or maybe I cant use RxDataSource for this and i should try something else. To make clear what I am talk about i include image
I would be very gratefull for any advice because I could not find anything usefull by my hand.
I would set it up as:
UICollectionView (main)
UICollectionViewCell (single cell for whole screen - horizontal scroll)
UICollectionView (inside a cell)
UICollectionViewCell(s) (vertical scroll)
You can have a cell that takes a whole screen or is a small rectangle, it's up to you
I have a tableview with custom cells that collapse and display details on a tap. There are more cells than can be displayed at a time on the screen. I want to create a custom UIGraphicsBeginImageContextWithOptions that has the header of the screen (an image with the logo of my app) and all the cells in the tableview displaying the details underneath and then share it using the share button.
I tried finding examples but was unable to find anything that helps. How can I achieve this result?
Here is an example of what I am looking for:
The above pictures are from the Blue Apron app. This specific page has a scrollable view (let's just say UITableView ) and within that UITableView they have this one section called Instructions which has cells numbered (1,2,3, etc.) as seen in the pictures above.
I assuming inside of that Instructions Section they have a UITableView to display those cells (Cook the freekeh, Prepare the ingredients, etc). But how do they make that UITableView unscrollable and make it scroll with the main UITableView?
I basically want to know how they get those list of views in that instruction section within that main UITableView without having it scroll.
Does anyone have any ideas or am I interpreting this completely wrong and there is a better method?
You can follow this you tube tutorial created by me.
https://www.youtube.com/watch?v=yQ1DfCI93pU
Just you need to replace collectionview with tableview.
Hope it will help!.