Can we use UICollectionView within UITableViewCell : iOS - ios

I was wondering to implement UICollectionView within my UITableViewCell, so just want to know Is that possible. Any link that would guide me, would be much better. Thanks in advance.

Yes You can, place collection view inside UITableViewCell as like normal objects. and configure collection with help of tag or index path

Related

Looking for the best scroll-view solution

I want to learn and implement the most suitable/simple solution to display dynamic data (JSON) in three lines and an active (clickable) download icon. Screenshot is attached
I would be glad to get your ideas and advice!
Thanks
UITableView is the way to go, as you can reuse a custom cell you define. And to add to that, UITableView's cells are loaded lazily and are reused. You can use a UIScrollView but if you have a lot of rows it can horde your memory real fast. In your case, a UIScrollView can be used as well, but if you plan on expanding, UITableViews would be the choice. All in all, go with a UITableView + a custom UITableViewCell
If you have array of data like this, the best way is using UITableView class. With UITableview, you can custom your UITableViewCell on the fly

How to create a multiple section tableview with horizontal scrolling like as below image?

I am trying to create a similar collection view as ![this][1]
[1]: https://i.stack.imgur.com/Wwqas.png image in tableview but i have no clue how to do it. My data is coming from server using web service.
How to achieve this ?
This is seems like UICollectionView inside UITableViewCell for independent scrolling
Please go through below link for more detail...
Click here
You will have to use UICollectionView inside your custom UITableViewCell.
The flow should be like this:
UITableViewCell --> UICollectionView --> UICollectionViewCell

Is it possible to have a UITableView inside a UITableViewCell?

Currently I have a UITableView that uses UITableViewCell that displays images from arse.com. I was wondering if I could add another UITableView inside the UITableViewCell to display an comments.
Short answer: Yes
Long(er) answer: HELL NO!
You are just opening an entire can of worms... What problem do you hope to solve by this, that is not solvable by using UITableViewCell subclass?

How to Subclass UICollectionView?

I would like to customize the UICollectionView, but all the tutorials on the web and in books use UICollectionViewController which I do not want to use. I'm combining different kinds of UICollectionViews in the same UIViewController, so I don't want to limit myself by subclassing UICollectionViewController, which doesn't allow me to place several UICollectionViews in the same viewController along with other objects and labels.
How do I subclass UICollectionView? Specifically, what kinds of methods need to be overwritten? How do I layout what goes into it (i.e. where to put a text label, image, etc.)? I'm familiar with the data source / delegate protocols, but not quite sure how to customize the cell's look, placement of sub items within the cell, what classes need to be overwritten/sub classed, etc.
A list of things I need to do would be much appreciated!
Thanks!
You can do it like this link
Here are some good Examples to customize your collectionview.
Use WaterfallCollectionView from this. It may help you.
I believe that you don't need to sub-class UICollectionView but you need to sub-class UICollectionViewFlowLayout.
UICollectionViewFlowLayout is the object which manages the display of the collection view items and it is highly customizable.
I suggest you follow WWDC 2012:Advanced Collection Views and Building Custom Layouts
The best tutorial which worked for me was by Apple called Using the Flow Layout.
I think you wont have to subclass a collection view. What you would need instead is subclassing UICollectionViewLayout to customize the positioning of cells within the collection view. And if you are looking for a customized look of a cell, you would also have to subclass UICollectionViewCell and assign the sub classed cells to the Collection View.
The below links might help you,
https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/CollectionViewPGforIOS/CreatingCustomLayouts/CreatingCustomLayouts.html
http://adoptioncurve.net/archives/2012/09/a-simple-uicollectionview-tutorial/

In iOS can a cell in a tableview have more than just a text

Can i have two images and a few text labels in a cell of a tableView ? All dynamically assigned ?
Yes, read the documentation for the UITableViewCell class, specifically the UITableViewCellStyle constants which allow for various types of standard table cells to be created. If the built in styles do not meet your requirements, you can subclass UITableViewCell and create anything you want, since it's just another type of UIView.
Of course you can! There are several ways of achieving that, the most popular being subclass the UITableViewCell class, and creating your own custom cell, and you can have whatever you want in it. But just to get an idea of how to go about doing that, I suggest you go through the following links:
Table View Programming Guide for iOS - Apple
Crafting Custom
UITableViewCells - MobileTuts+

Resources