thorntechpublic / horizontalscrollingcollectionview Goto Github PK
View Code? Open in Web Editor NEWIndependently scroll rows by newsting UICollectionView inside UITableView
Independently scroll rows by newsting UICollectionView inside UITableView
Great Project! It will be perfect if can Add/Delete Sections and Add/Delete CollectionView Cells from user interface, can you help me please. Thanks
Hi,
thanks for sharing this tutorial, very useful.
Unfortunatelly I think I found a bug.
To see what I mean, please extend the number of section to
var categories = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11","12", "13", "14", "15", "16", "17" ]
and add different color per collection cell (in CategoryRow.swift)
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier("videoCell", forIndexPath: indexPath) as! VideoCell
if (indexPath.row == 0) {cell.backgroundColor = UIColor.greenColor()}
if (indexPath.row == 1) {cell.backgroundColor = UIColor.redColor()}
if (indexPath.row == 2) {cell.backgroundColor = UIColor.blueColor()}
if (indexPath.row == 3) {cell.backgroundColor = UIColor.purpleColor()}
if (indexPath.row == 4) {cell.backgroundColor = UIColor.yellowColor()}
if (indexPath.row == 5) {cell.backgroundColor = UIColor.grayColor()}
if (indexPath.row == 6) {cell.backgroundColor = UIColor.cyanColor()}
if (indexPath.row == 7) {cell.backgroundColor = UIColor.clearColor()}
if (indexPath.row == 8) {cell.backgroundColor = UIColor.blackColor()}
if (indexPath.row == 9) {cell.backgroundColor = UIColor.brownColor()}
if (indexPath.row == 10) {cell.backgroundColor = UIColor.darkGrayColor()}
if (indexPath.row == 11) {cell.backgroundColor = UIColor.orangeColor()}
return cell
}
If you scroll row 1, also the row 7 and 13 are scrolled by the same quantity.
If you scroll row 2, also the row 7 and 14 are scrolled.
IMO is something related to the heigh of the display, n x 1.8 x display height the scroll is repeated.
I hope this can help.
Thx,
Michele
I can get indexpath.row and indexpath.section of the collectionview. But can't get indexpath.section of tableview.
Please help.
Would be awesome if there is a swift 3 version of the Melvin branch. Am trying now to do the conversion and will do a pull request if succesful
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.